Service continuity implementation method, device, and service continuity implementation system

ABSTRACT

A service continuity implementation method, a device, and a service continuity implementation system, to ensure service continuity in a handover process, where the method includes: selecting, by a session management function entity, a target user plane function entity to serve a terminal; sending, by the session management function entity, a first message to a control device; receiving, by the session management function entity, indication information of a first application server (AS) from the control device; and sending, by the session management function entity, a first routing rule to the target user plane function entity based on the indication information of the first AS, where the first routing rule specifies that data whose destination address is an address of the first AS is to be sent to the first AS.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2017/089859, filed on Jun. 23, 2017, the disclosure of whichis hereby incorporated by reference in its entirety.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a service continuity implementation method, adevice, and a service continuity implementation system.

BACKGROUND

To meet challenges of wireless broadband technologies and retainleading-edge advantages of 3rd generation partnership project (3GPP)networks, the 3GPP standard organization formulated a networkarchitecture of a next generation mobile communications system by theend of 2016, which is referred to as a 5th generation (5G) networkarchitecture.

In the 5G network architecture, an ultra-reliable low-latencycommunication (URLLC) scenario is defined, and mainly includes servicessuch as self-driving and industrial automation that require alow-latency and high-reliable connection. For example, the existing 5Gtechnical specification (TS) 22.186 specifies that in a remote drivingscenario, end-to-end latency between a terminal and a server needs to bealways less than 5 ms. To meet an end-to-end latency requirement, anapplication server (AS) needs to be deployed locally. In addition, ifthe terminal moves at a high speed, a handover of a user plane function(UPF) entity and a handover of an AS may occur, and service continuityneeds to be ensured in a handover process, in order to meet theend-to-end latency requirement all the time.

Currently, a feasible solution to locally deploy an application serveris to use an uplink classifier (ULCL) mechanism. In a ULCL scenario, forone packet data unit (PDU) session, there may be a plurality of UPFentities, and local offloading may be implemented using a ULCL. In thisway, an application server that provides an ultra-low latency service ora high-value service can be deployed locally. In such a deployment, apath between the terminal and the AS is shortest, such that end-to-endlatency can meet an ultra-low latency requirement.

However, currently, there is no related solution to ensure the servicecontinuity in the handover process.

SUMMARY

Embodiments of this application provide a service continuityimplementation method, a device, and a service continuity implementationsystem, to ensure service continuity in a handover process.

According to a first aspect, a service continuity implementation methodis provided. The method includes: selecting, by a session managementfunction entity, a target user plane function entity to serve aterminal; sending, by the session management function entity, a firstmessage to a control device; receiving, by the session managementfunction entity, indication information of a first application server(AS) from the control device; and sending, by the session managementfunction entity, a first routing rule to the target user plane functionentity based on the indication information of the first AS, where thefirst routing rule includes that data whose destination address is anaddress of the first AS is sent to the first AS. Based on this solution,in one aspect, after the session management function entity selects thetarget user plane function entity to serve the terminal, the sessionmanagement function entity may receive the indication information of thefirst AS, and send the first routing rule to the target user planefunction entity based on the indication information of the first AS,such that the target user plane function entity can transmit servicedata according to the first routing rule. Therefore, service continuitycan be ensured in a handover process of a user plane function entity. Inanother aspect, the first routing rule is that the data whosedestination address is the address of the first AS is sent to the firstAS. This prevents the target user plane function entity from routing thedata that is to be sent to the first AS first to a remote data networkand then to the first AS. Therefore, a path from the terminal to thefirst AS is shortest, and latency is controllable.

Optionally, after selecting, by a session management function entity, atarget user plane function entity to serve a terminal, and beforesending, by the session management function entity, a first routing ruleto the target user plane function entity, the method further includes:sending, by the session management function entity, a second routingrule to the target user plane function entity, where the second routingrule includes that data whose destination address is an address of asecond AS is sent to a source user plane function entity, the second ASis an AS currently serving the terminal, and the source user planefunction entity is a user plane function entity communicativelyconnected to the second AS. Based on this solution, when a handover ofthe user plane function entity occurs, the target user plane functionentity after the handover includes a routing rule for service data whosedestination address is the address of the current AS. Therefore,continuity of the service can be maintained during the handover of theuser plane function entity.

Optionally, after selecting, by a session management function entity, atarget user plane function entity to serve a terminal, the methodfurther includes: sending, by the session management function entity,first path information to the target user plane function entity; andsending, by the session management function entity, second pathinformation to the source user plane function entity, where the firstpath information and the second path information are used to establish aforwarding path between the target user plane function entity and thesource user plane function entity. Based on this solution, theforwarding path between the target user plane function entity and thesource user plane function entity can be established.

Optionally, after selecting, by a session management function entity, atarget user plane function entity to serve a terminal, the methodfurther includes: sending, by the session management function entity, athird routing rule to the target user plane function entity, where thethird routing rule includes that data whose destination address is anaddress of a first data network is sent to a remote user plane functionentity, and the remote user plane function entity is a user planefunction entity communicatively connected to the first data network.Based on this solution, when a handover of the user plane functionentity occurs, the target user plane function entity after the handoverincludes a routing rule for service data whose destination address isthe address of the first data network. Therefore, continuity of theservice can be maintained during the handover of the user plane functionentity.

Optionally, after selecting, by a session management function entity, atarget user plane function entity to serve a terminal, the methodfurther includes: sending, by the session management function entity,third path information to the target user plane function entity; andsending, by the session management function entity, fourth pathinformation to the remote user plane function entity, where the thirdpath information and the fourth path information are used to establish aforwarding path between the target user plane function entity and theremote user plane function entity. Based on this solution, theforwarding path between the target user plane function entity and theremote user plane function entity can be established.

Optionally, after sending, by the session management function entity, afirst routing rule to the target user plane function entity, the methodfurther includes: sending, by the session management function entity, asecond message to the target user plane function entity, where thesecond message is used to request to delete the second routing rule. Inother words, when a network side path has been ready, a routing rulecorresponding to an original service on the target user plane functionentity can be released.

Optionally, after sending, by the session management function entity, afirst routing rule to the target user plane function entity, the methodfurther includes: sending, by the session management function entity, athird message to the target user plane function entity, where the thirdmessage is used to request to delete the first path information. Inother words, if the network side path has been ready, path informationcorresponding to an original service on the target user plane functionentity can be released.

Optionally, after sending, by the session management function entity, afirst routing rule to the target user plane function entity, the methodfurther includes: sending, by the session management function entity, afourth message to the source user plane function entity, where thefourth message is used to request to delete user plane information,corresponding to the terminal, on the source user plane function entity,and the user plane information includes the second path information. Inother words, if the network side path has been ready, the user planeinformation, corresponding to the terminal, on the source user planefunction entity can be released.

Optionally, before selecting, by a session management function entity, atarget user plane function entity to serve a terminal, the methodfurther includes: sending, by the session management function entity,fifth path information to a target base station; and sending, by thesession management function entity, sixth path information to the sourceuser plane function entity, where the fifth path information and thesixth path information are used to establish a forwarding path betweenthe target base station and the source user plane function entity, thesource user plane function entity is a user plane function entitycurrently establishing a first packet data unit PDU session with theterminal, and the target base station is a base station currentlycommunicatively connected to the target user plane function entity.Based on this solution, the forwarding path between the target basestation and the source user plane function entity can bepre-established, such that when a handover of the user plane functionentity occurs, continuity of a current service can be maintained.

Optionally, selecting, by a session management function entity, a targetuser plane function entity to serve a terminal includes: sending, by thesession management function entity, a fifth message to the terminal,where the fifth message is used to request to establish a second PDUsession; and selecting, by the session management function entity in aprocess of establishing the second PDU session, the target user planefunction entity to serve the terminal. Based on this solution, thesession management function entity can select the target user planefunction entity to serve the terminal.

Optionally, after sending, by the session management function entity, afirst routing rule to the target user plane function entity, the methodfurther includes: sending, by the session management function entity, asixth message to the terminal, where the sixth message is used torequest to release the first PDU session. In other words, when a networkside path for a new PDU session has been ready, an old PDU sessionresource can be released.

Optionally, after sending, by the session management function entity, afirst routing rule to the target user plane function entity, the methodfurther includes: sending, by the session management function entity, aseventh message to the control device, where the seventh message is usedto request to switch the terminal from the second AS to the first AS,and the second AS is the AS currently serving the terminal. Based onthis solution, the terminal can be switched from the second AS to thefirst AS.

Optionally, after sending, by the session management function entity, aseventh message to the control device, the method further includes:receiving, by the session management function entity, an eighth messagefrom the control device, where the eighth message is used to indicatethat the terminal has been switched from the second AS to the first AS.In this way, the control device can learn of, in a timely manner,whether a handover of the AS is completed, and can further perform asubsequent operation in a timely manner.

Optionally, the first message includes at least one of locationinformation of the target user plane function entity or locationinformation of the terminal, and at least one of the locationinformation of the target user plane function entity or the locationinformation of the terminal is used to determine that an AS serving theterminal is the first AS. In this way, after receiving the firstmessage, the control device can determine, based on the first message,the AS serving the terminal.

Optionally, the indication information of the first AS includes locationinformation of the first AS, identifier information of the first AS,information indicating that the AS does not change, or the like. This isnot specifically limited in this embodiment of this application.

According to a second aspect, a service continuity implementation methodis provided. The method includes: receiving, by a control device, afirst message from a session management function entity; and sending, bythe control device, indication information of a first AS to the sessionmanagement function entity, where the indication information of thefirst AS is used to instruct the session management function entity tosend a first routing rule to a target user plane function entity, andthe first routing rule includes that data whose destination address isan address of the first AS is sent to the first AS. Based on thissolution, in one aspect, after the control device sends the indicationinformation of the first AS to the session management function entity,the session management function entity may receive the indicationinformation of the first AS, and send the first routing rule to thetarget user plane function entity based on the indication information ofthe first AS, such that the target user plane function entity cantransmit service data according to the first routing rule. Therefore,service continuity can be ensured in a handover process of a user planefunction entity. In another aspect, the first routing rule is that thedata whose destination address is the address of the first AS is sent tothe first AS. This prevents the target user plane function entity fromrouting the data that is to be sent to the address of the first AS firstto a remote data network and then to the first AS. Therefore, a pathfrom a terminal to the first AS is shortest, and latency iscontrollable.

Optionally, the first message includes at least one of locationinformation of the target user plane function entity or locationinformation of the terminal, and at least one of the locationinformation of the target user plane function entity or the locationinformation of the terminal is used to determine that an AS serving theterminal is the first AS. In this way, after receiving the firstmessage, the control device can determine, based on the first message,the AS serving the terminal.

Optionally, after sending, by the control device, indication informationof a first AS to the session management function entity, the methodfurther includes: receiving, by the control device, a seventh messagefrom the session management function entity, where the seventh messageis used to instruct to switch the terminal from a second AS to the firstAS, and the second AS is an AS currently serving the terminal; andswitching, by the control device, the terminal from the second AS to thefirst AS based on the seventh message. Based on this solution, theterminal can be switched from the second AS to the first AS.

Optionally, the control device includes a vehicle to everything (V2X)communication control function entity.

According to a third aspect, a session management function entity isprovided. The session management function entity has a function ofimplementing the method according to the first aspect. The function maybe implemented using hardware, or may be implemented using hardware byexecuting corresponding software. The hardware or the software includesone or more modules corresponding to the function.

According to a fourth aspect, a session management function entity isprovided, including a processor, a memory, a bus, and a communicationsinterface. The memory is configured to store a computer executableinstruction. The processor is connected to the memory using the bus.When the session management function entity runs, the processor executesthe computer executable instruction stored in the memory, such that thesession management function entity performs the service continuityimplementation method according to any one of the design manners of thefirst aspect.

According to a fifth aspect, an embodiment of this application providesa computer-readable storage medium. The computer-readable storage mediumstores an instruction. When the instruction is run on a computer, thecomputer is enabled to perform the service continuity implementationmethod according to any one of the design manners of the first aspect.

According to a sixth aspect, an embodiment of this application providesa computer program product including an instruction. When the computerprogram product is run on a computer, the computer is enabled to performthe service continuity implementation method according to any one of thedesign manners of the first aspect.

For technical effects brought by any one of the design manners of thethird aspect to the sixth aspect, refer to technical effects brought bydifferent design manners of the first aspect. Details are not describedherein again.

According to a seventh aspect, a control device is provided. The controldevice has a function of implementing the method according to the secondaspect. The function may be implemented using hardware, or may beimplemented using hardware by executing corresponding software. Thehardware or the software includes one or more modules corresponding tothe function.

According to an eighth aspect, a control device is provided, including aprocessor, a memory, a bus, and a communications interface. The memoryis configured to store a computer executable instruction. The processoris connected to the memory using the bus. When the control device runs,the processor executes the computer executable instruction stored in thememory, such that the control device performs the service continuityimplementation method according to any one of the design manners of thesecond aspect.

According to a ninth aspect, a computer-readable storage medium isprovided. The computer-readable storage medium stores an instruction.When the instruction is run on a computer, the computer is enabled toperform the service continuity implementation method according to anyone of the design manners of the second aspect.

According to a tenth aspect, a computer program product including aninstruction is provided. When the computer program product is run on acomputer, the computer is enabled to perform the service continuityimplementation method according to any one of the design manners of thesecond aspect.

For technical effects brought by any one of the design manners of theseventh aspect to the tenth aspect, refer to technical effects broughtby different design manners of the second aspect. Details are notdescribed herein again.

According to an eleventh aspect, a service continuity implementationmethod is provided. The method includes: selecting, by a sessionmanagement function entity, a target user plane function entity to servea terminal; sending, by the session management function entity, a firstmessage to a control device, receiving, by the control device, the firstmessage from the session management function entity; sending, by thecontrol device, indication information of a first AS to the sessionmanagement function entity; and receiving, by the session managementfunction entity, the indication information of the first AS from thecontrol device; and sending, by the session management function entity,a first routing rule to the target user plane function entity based onthe indication information of the first AS, where the first routing ruleincludes that data whose destination address is an address of the firstAS is sent to the first AS.

According to a twelfth aspect, a service continuity implementationsystem is provided, including the control device according to any one ofthe foregoing aspects and the session management function entityaccording to any one of the foregoing aspects.

These aspects or other aspects in this application may be clearer andeasier to understand in descriptions in the following embodiments.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a first schematic architectural diagram of a servicecontinuity implementation system according to an embodiment of thisapplication;

FIG. 2 is a second schematic architectural diagram of a servicecontinuity implementation system according to an embodiment of thisapplication;

FIG. 3 is a third schematic architectural diagram of a servicecontinuity implementation system according to an embodiment of thisapplication;

FIG. 4 is a schematic diagram of a hardware structure of acommunications device according to an embodiment of this application;

FIG. 5 is a first schematic flowchart of a service continuityimplementation method according to an embodiment of this application;

FIG. 6A and FIG. 6B are second schematic flowcharts of a servicecontinuity implementation method according to an embodiment of thisapplication;

FIG. 7A and FIG. 7B are third schematic flowcharts of a servicecontinuity implementation method according to an embodiment of thisapplication;

FIG. 8A and FIG. 8B are fourth schematic flowcharts of a servicecontinuity implementation method according to an embodiment of thisapplication;

FIG. 9A and FIG. 9B are fifth schematic flowcharts of a servicecontinuity implementation method according to an embodiment of thisapplication;

FIG. 10 is a first schematic structural diagram of a session managementfunction entity according to an embodiment of this application;

FIG. 11 is a second schematic structural diagram of a session managementfunction entity according to an embodiment of this application;

FIG. 12 is a first schematic structural diagram of a control deviceaccording to an embodiment of this application; and

FIG. 13 is a second schematic structural diagram of a control deviceaccording to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

For ease of understanding technical solutions in the embodiments of thisapplication, the following first briefly describes technologies relatedto this application.

1. Tunnel

Tunnels in the embodiments of this application include a next generation(Next generation, N) interface 3 (N3) tunnel and an N interface 9 (N9)tunnel. The N3 tunnel is a tunnel between an access device (for example,a base station) and a UPF entity. The N9 tunnel is a tunnel between UPFentities. Generally, the N3 tunnel is a tunnel at a session granularity,and the N9 tunnel may be a tunnel at a session granularity, or a tunnelat a device granularity.

The tunnel at a session granularity means the resources of the tunnelare established for one PDU session, and the tunnel is used for only onePDU session. One tunnel at a session granularity includes only onerouting rule, and only the routing rule can correspond to the tunnel forforwarding data. In addition, a lifecycle of the tunnel at a sessiongranularity is a lifecycle of one PDU session. To be more specific, whenthe PDU session disappears or is released, the tunnel at a sessiongranularity also needs to be released.

The tunnel at a device granularity is a tunnel resource established forone or more PDU sessions, and the tunnel may be used for one or more PDUsessions. One tunnel at a device granularity may include one or morerouting rules, and each of the one or more routing rules can correspondto the tunnel for forwarding data. In addition, a lifecycle of thetunnel at a device granularity is a lifecycle of a plurality of PDUsessions corresponding to the tunnel. To be more specific, assuming thatthe tunnel at a device granularity corresponds to M PDU sessions, whenthe first M-1 PDU sessions in the plurality of PDU sessionscorresponding to the tunnel disappear or are released, only routingrules corresponding to the corresponding PDU sessions are released; andthe tunnel at a device granularity can be released only when an M^(th)PDU session in the plurality of PDU sessions corresponding to the tunneldisappears or is released. Certainly, when the M^(th) PDU session in theplurality of PDU sessions corresponding to the tunnel disappears or isreleased, the tunnel at a device granularity may be alternativelyretained, such that the tunnel does not need to be re-establishedsubsequently. This is not specifically limited in the embodiments ofthis application.

2. Routing Rule

A routing rule in the embodiments of this application is a rule forrouting service data to a next-hop device.

For example, a first routing rule on a target UPF entity in thefollowing embodiments includes that data whose destination address is anaddress of a first AS is sent to the first AS. This means that anext-hop device for service data whose destination address is theaddress of the first AS is the first AS.

Alternatively, for example, a second routing rule on a target UPF entityin the following embodiments includes that data whose destinationaddress is an address of an AS 1 is sent to a source UPF entity. Thismeans that a next-hop device for service data whose destination addressis the address of the AS 1 is the source UPF entity.

Alternatively, for example, a third routing rule on a target UPF entityincludes that data whose destination address is an address of an anchordata network (A-DN) or data whose destination address is default is sentto an A-UPF entity. This means that a next-hop device for service datawhose destination address is the address of the A-DN or service datawhose destination address is default is the A-UPF entity.

Alternatively, for example, a fourth routing rule on a source UPF entityincludes that data whose destination address is an address of a terminalis sent to a target UPF entity. This means that a next-hop device forservice data whose destination address is the address of the terminal isthe target UPF entity.

Alternatively, for example, a fifth routing rule on a source UPF entityincludes that data whose destination address is an address of a terminalis sent to a target base station. This means that a next-hop device forservice data whose destination address is the address of the terminal isthe target base station.

3. Path Information

Path information in the embodiments of this application includes atleast one of tunnel uplink information of A or tunnel downlinkinformation of B, and is used to establish a tunnel between A and B. Thetunnel uplink information of A may include an endpoint address of thetunnel on the A side, an address of A, and the like. The tunnel downlinkinformation of B includes an endpoint address of the tunnel on the Bside, an address of B, and the like. This is not specifically limited inthe embodiments of this application.

It should be noted that the path information in the embodiments of thisapplication may include a routing rule, or may not include a routingrule. The following embodiments are described using an example in whichpath information does not include a routing rule. A general descriptionis provided herein, and details are not described below again.

The following describes the technical solutions in the embodiments ofthis application with reference to the accompanying drawings in theembodiments of this application. In descriptions of this application,“/” means “or” unless otherwise specified. For example, A/B mayrepresent A or B. In this specification, “and/or” describes only anassociation relationship for describing associated objects andrepresents that three relationships may exist. For example, A and/or Bmay represent the following three cases: Only A exists, both A and Bexist, and only B exists. In addition, in the descriptions of thisapplication, “a plurality of” means two or more than two unlessotherwise specified. In addition, to clearly describe the technicalsolutions in the embodiments of this application, terms such as “first”and “second” are used in the embodiments of this application todistinguish between same items or similar items that have basically thesame functions or purposes. A person skilled in the art may understandthat the terms such as “first” and “second” do not limit a quantity oran execution sequence, and that the terms such as “first” and “second”do not indicate a definite difference. For example, a first AS and asecond AS in the embodiments of this application may be a same AS, ormay be different ASs. This is not specifically limited in theembodiments of this application.

A network architecture and a service scenario described in theembodiments of this application are intended to describe the technicalsolutions in the embodiments of this application more clearly, and donot constitute a limitation on the technical solutions provided in theembodiments of this application. A person of ordinary skill in the artmay know that, with evolution of the network architecture and emergenceof a new service scenario, the technical solutions provided in theembodiments of this application are also applicable to similar technicalproblems.

FIG. 1 is a schematic architectural diagram of a service continuityimplementation system 10 according to an embodiment of this application.The service continuity implementation system 10 includes a sessionmanagement function entity 101 and a control device 102, and may furtherinclude a plurality of user plane function entities. For example, theplurality of user plane function entities may include a target userplane function entity 103 and a source user plane function entity 104.

In an initial state, the session management function entity 101communicates with the source user plane function entity 104.

After a terminal moves, the session management function entity 101 isconfigured to: select the target user plane function entity 103 to servethe terminal; and send a first message to the control device 102.

The control device 102 is configured to: receive the first message fromthe session management function entity 101; and send indicationinformation of a first AS to the session management function entity 101.

The session management function entity 101 is further configured to:receive the indication information of the first AS from the controldevice 102; and send a first routing rule to the target user planefunction entity 103 based on the indication information of the first AS,where the first routing rule includes that data whose destinationaddress is an address of the first AS is sent to the first AS.

The target user plane function entity 103 is configured to: receive thefirst routing rule from the session management function entity 101; andtransmit service data according to the first routing rule after a PDUsession is established.

Optionally, the session management function entity 101 and the controldevice 102 in FIG. 1 may directly communicate with each other, or maycommunicate with each other through forwarding by another networkdevice. This is not specifically limited in this embodiment of thisapplication.

Optionally, the session management function entity 101 and the targetuser plane function entity 103 in FIG. 1 may directly communicate witheach other, or may communicate with each other through forwarding byanother network device. This is not specifically limited in thisembodiment of this application.

According to the service continuity system provided in this embodimentof this application, in one aspect, after the session managementfunction entity selects the target user plane function entity to servethe terminal, the session management function entity may receive theindication information of the first AS, and send the first routing ruleto the target user plane function entity based on the indicationinformation of the first AS, such that the target user plane functionentity can transmit the service data according to the first routingrule. Therefore, service continuity can be ensured in a handover processof the user plane function entity. In another aspect, the first routingrule is that the data whose destination address is the address of thefirst AS is sent to the first AS. This prevents the target user planefunction entity from routing the data that is to be sent to the addressof the first AS first to a remote data network (DN) and then to thefirst AS. Therefore, a path from the terminal to the first AS isshortest, and latency is controllable.

Optionally, the service continuity implementation system 10 may beapplied to a future 5G network and another future network. This is notspecifically limited in this embodiment of this application. Thefollowing provides two typical scenarios in which the service continuityimplementation system 10 is applied to a current 5G network.

Scenario 1

If the service continuity implementation system 10 is applied to thecurrent 5G network, a possible applicable architecture is a ULCLarchitecture shown in FIG. 2. In a ULCL scenario, there may be aplurality of UPF entities for one PDU session, and local offloading maybe implemented using a ULCL. The plurality of UPF entities include atleast one local UPF entity and a remote UPF entity. The at least onelocal UPF entity may include, for example, a local UPF entity 1, a localUPF entity 2, . . . , and a local UPF entity n. The session managementfunction entity 101 in FIG. 1 may be a session management function (SMF)entity in the ULCL architecture, the control device 102 in FIG. 1 may bean AS controller (controller) in the ULCL architecture, the target userplane function entity in FIG. 1 may be any UPF entity in the ULCLarchitecture, for example, the local UPF entity 1, and the source userplane function entity in FIG. 1 may be any UPF entity different from thelocal UPF entity 1 in the ULCL architecture, for example, the local UPFentity 2. In addition, as shown in FIG. 2, the ULCL architecture mayfurther include a terminal, an access device, an access and mobilitymanagement function (AMF) entity, the ULCL, and a plurality of datanetworks (DNs). The plurality of DNs include one remote DN and aplurality of local DNs. The plurality of local DNs may include, forexample, a DN 1, a DN 2, . . . , and a DN n.

The terminal communicates with the AMF entity using a next generation(next generation, N) network interface 1 (N1), and communicates with theULCL using the access device. The access device communicates with theAMF entity using an N interface 2 (N2), and communicates with the ULCLusing an N interface 3 (N3). The AMF entity communicates with the SMFentity using an N interface 11 (N11). The SMF entity communicates withthe UPF entities (including the remote UPF entity and the local UPFentity) and the ULCL using an N interface 4 (N4). The ULCL communicateswith the UPF entities (including the remote UPF entity and the local UPFentity) using an N interface 9 (N9). The UPF entities (including theremote UPF entity and the local UPF entity) communicate with the DNs(including the remote DN and the local DN) using an N interface 6 (N6).

Optionally, in this embodiment of this application, the local UPF entityand the ULCL may be deployed together or separately. This is notspecifically limited in this embodiment of this application. When thelocal UPF entity and the ULCL are deployed separately, the ULCL may beimplemented using the UPF entity. A general description is providedherein, and details are not described below again.

Optionally, in this embodiment of this application, the local UPF entityis a local service anchor. A local AS is deployed in a DNcommunicatively connected to the local UPF entity, and the terminal mayaccess the local AS using the local UPF entity.

It should be noted that a communication connection in this embodiment ofthis application may be a direct connection, or may be a connectionusing another network device. A general description is provided herein,and details are not described below again.

Optionally, in this embodiment of this application, the remote UPFentity is an Internet Protocol (IP) anchor. An IP address remainsunchanged if the UPF entity remains unchanged. A remote AS may bedeployed in a DN communicatively connected to the remote UPF entity, andthe terminal may access the remote AS using the remote UPF entity.Certainly, the terminal may communicate with another terminal using theDN communicatively connected to the remote UPF entity. This is notspecifically limited in this embodiment of this application.

In FIG. 2, for uplink data, the ULCL forwards, according to anoffloading rule delivered by the SMF entity, a local service to thelocal UPF entity and a non-local service to the remote UPF entity.

In this scenario, for a terminal using a URLLC service, in a movingprocess of the terminal, the remote UPF entity remains unchanged, andtherefore the IP address remains unchanged. However, to ensure that apath between the terminal and an AS is shortest, a handover of the localUPF entity and a handover of an AS may need to be performed. The AScontroller maintains topology information of an AS, and may perform ASselection or reselection based on location information of the local UPFentity and/or location information of the terminal. Therefore, when thehandover of the local UPF entity needs to be performed, the SMF entityneeds to interact with the AS controller to implement the ASreselection, in order to implement the shortest path between theterminal and the AS.

It should be noted that FIG. 2 shows an example in which different localUPF entities communicate with AS s in different DNs. Certainly, inanother example, the different local UPF entities may communicate withan AS in a same DN. In other words, after the handover of the local UPFentity occurs, the handover of the AS may not occur. This is notspecifically limited in this embodiment of this application.

Scenario 2

Optionally, if the service continuity implementation system 10 isapplied to the current 5G network, another possible applicablearchitecture is shown in FIG. 3. The network architecture shown in FIG.3 corresponds to a single-anchor PDU session scenario. To be morespecific, one PDU session corresponds to one UPF entity. For example,the session management function entity 101 in FIG. 1 may be an SMFentity in FIG. 3, the control device 102 in FIG. 1 may be an AScontroller in FIG. 3, the target user plane function entity in FIG. 1may be a UPF entity 1 in FIG. 3, and the source user plane functionentity in FIG. 1 may be a UPF entity 2 in FIG. 3. In addition, as shownin FIG. 3, the network architecture may further include a terminal, anaccess device, an AMF entity, and a DN. An AS is deployed in the DN. Toensure that a path between the terminal and the AS is shortest, the UPFentity and the AS usually need to be deployed locally. Certainly, for aservice with a low end-to-end latency requirement, the UPF entity andthe AS may not be deployed locally. This is not specifically limited inthis embodiment of this application.

The terminal communicates with the AMF entity using an N1, andcommunicates with UPF entities (including the UPF entity 1 to a UPFentity n) using the access device. The access device communicates withthe AMF entity using an N2, and communicates with the UPF entities(including the UPF entity 1 to the UPF entity n) using an N3. The AMFentity communicates with the SMF entity using an N11. The SMF entitycommunicates with the UPF entities (including the UPF entity 1 to theUPF entity n) using an N4. The UPF entity (including the UPF entity 1 tothe UPF entity n) communicates with DNs (including a DN 1 to a DN n)using an N6.

In this scenario, for a terminal using a URLLC service, in a movingprocess of the terminal, a handover of the UPF entity and a handover ofthe AS may need to be performed. The AS controller maintains topologyinformation of an AS, and may perform AS selection or reselection basedon location information of the local UPF entity and/or locationinformation of the terminal. Therefore, when the handover of the UPFentity needs to be performed, the SMF entity needs to interact with theAS controller to implement the AS reselection, in order to implement theshortest path between the terminal and the AS.

It should be noted that FIG. 3 shows an example in which different UPFentities communicate with AS s in different DNs. Certainly,alternatively, the different UPF entities may communicate with an AS ina same DN. In other words, after the handover of the UPF entity occurs,the handover of the AS may not occur. This is not specifically limitedin this embodiment of this application.

It should be noted that names of interfaces between network elements inFIG. 2 and FIG. 3 are merely examples, and the interfaces may have othernames during specific implementation. This is not specifically limitedin this embodiment of this application.

It should be noted that the access device, the AMF entity, the SMFentity, the UPF entity, the AS, the AS controller, and the like in FIG.2 and FIG. 3 are merely names, and the names constitute no limitation onthe devices. In the 5G network and other future networks, the accessdevice, the AMF entity, the SMF entity, the UPF entity, the AS, and theAS controller may have other names. This is not specifically limited inthis embodiment of this application. For example, the UPF entity may bealternatively replaced with a UP, the AS may be alternatively replacedwith an application management platform or a mobile edge computing (MEC)platform, and the AS controller may be alternatively replaced with avehicle to everything (V2X) communication control function entity or thelike. A general description is provided herein, and details are notdescribed below again.

Optionally, the terminal in this embodiment of this application mayinclude various handheld devices, vehicle-mounted devices, wearabledevices, and computing devices that have a wireless communicationsfunction, or other processing devices connected to a wireless modem. Theterminal may further include a subscriber unit, a cellular phone, asmartphone, a wireless data card, a personal digital assistant (PDA)computer, a tablet computer, a wireless modem, a handheld device, alaptop computer, a cordless phone, a wireless local loop (WLL) station,a machine type communication (MTC) terminal, a user equipment (UE), amobile station (MS), a terminal device, and the like. For ease ofdescription, the devices mentioned above are collectively referred to asa terminal in this application.

Optionally, the access device in this embodiment of this application isa device that accesses a core network. For example, the access devicemay be a base station, a broadband network gateway (BNG), an aggregationswitch, or a non-3GPP access device. The base station may include amacro base station, a micro base station (also referred to as a smallcell), a relay station, an access point, and the like in various forms.

Optionally, the AMF entity in this embodiment of this application isresponsible for functions such as registration management, mobilitymanagement, and lawful interception.

Optionally, for functions of the SMF entity and the AS controller inthis embodiment of this application, refer to the descriptions inFIG. 1. Details are not described herein again. In addition, the SMFentity is further configured to perform session management, includingsession establishment, session modification, session release, and othersession-related control functions such as allocation and management ofan IP address of the terminal, selection and control of the UPF entity,and lawful interception.

Optionally, the UPF entity in this embodiment of this application may beresponsible for processing functions such as forwarding and statisticscollection of a packet of the terminal. For example, the UPF entity mayperform user plane functions of a serving gateway (SGW) and a packetdata network gateway (PGW). Alternatively, the UPF entity may be asoftware-defined networking (SDN) switch. This is not specificallylimited in this embodiment of this application.

Optionally, the session management function entity 101 and the controldevice 102 in FIG. 1 may be implemented by one physical device, or maybe jointly implemented by a plurality of physical devices, or may be alogical function module in a physical device. This is not specificallylimited in this embodiment of this application.

For example, as shown in FIG. 4, both the session management functionentity 101 and the control device 102 in FIG. 1 may be implemented by acommunications device in FIG. 4.

FIG. 4 is a schematic diagram of a hardware structure of acommunications device according to an embodiment of this application.The communications device 400 includes at least one processor 401, acommunications bus 402, a memory 403, and at least one communicationsinterface 404.

The processor 401 may be a general-purpose central processing unit(CPU), a microprocessor, an application-specific integrated circuit(ASIC), or one or more integrated circuits configured to controlexecution of a program in the solutions of this application.

The communications bus 402 may include a path used to transmitinformation between the foregoing components.

The communications interface 404 is any apparatus such as a transceiver,and is configured to communicate with another device or communicationsnetwork, such as the Ethernet, a radio access network (RAN), or awireless local area network (WLAN).

The memory 403 may be a read-only memory (ROM) or another type of staticstorage device capable of storing static information and instructions, arandom access memory (RAM) or another type of dynamic storage devicecapable of storing information and instructions, or may be anelectrically erasable programmable read-only memory (EEPROM), a compactdisc (CD) read-only memory (CD-ROM) or another compact disc storage, anoptical disc storage (including a compressed optical disc, a laser disc,an optical disc, a digital versatile disc, a Blu-ray optical disc, andthe like), a magnetic disk storage medium or another magnetic storagedevice, or any other medium capable of carrying or storing expectedprogram code in a form of instructions or data structures and capable ofbeing accessed by a computer, but is not limited thereto. The memory mayexist independently, and is connected to the processor using the bus.The memory may be alternatively integrated with the processor.

The memory 403 is configured to store application program code forperforming the solutions in this application, and the applicationprogram code is executed under control of the processor 401. Theprocessor 401 is configured to execute the application program codestored in the memory 403 to implement a service continuityimplementation method provided in the following embodiments of thisapplication.

During implementation, in an embodiment, the processor 401 may includeone or more CPUs, for example, a CPU 0 and a CPU 1 in FIG. 4.

During implementation, in an embodiment, the communications device 400may include a plurality of processors, for example, the processor 401and a processor 408 in FIG. 4. Each of these processors may be asingle-core (single-CPU) processor, or may be a multi-core (multi-CPU)processor. The processor herein may be one or more devices, circuits,and/or processing cores configured to process data (for example, acomputer program instruction).

During implementation, in an embodiment, the communications device 400may further include an output device 405 and an input device 406. Theoutput device 405 communicates with the processor 401, and may displayinformation in a plurality of manners. For example, the output device405 may be a liquid crystal display (LCD), a light emitting diode (LED)display device, a cathode ray tube (CRT) display device, or a projector.The input device 406 communicates with the processor 401, and mayreceive user input in a plurality of manners. For example, the inputdevice 406 may be a mouse, a keyboard, a touchscreen device, or asensing device.

The communications device 400 may be a general-purpose communicationsdevice or a dedicated communications device. During implementation, thecommunications device 400 may be a desktop computer, a portablecomputer, a network server, a palmtop computer (PDA), a mobile phone, atablet computer, a wireless terminal device, an embedded device, or adevice with a structure similar to that in FIG. 4. A type of thecommunications device 400 is not limited in this embodiment of thisapplication.

The following describes in detail a service continuity implementationmethod provided in the embodiments of this application with reference toFIG. 1 to FIG. 4.

First, with reference to the service continuity implementation system 10shown in FIG. 1, FIG. 5 is a schematic flowchart of a service continuityimplementation method according to an embodiment of this application.Interactions between a session management function entity 101, a controldevice 102, and a target user plane function entity 103 are involved,and the following steps are included.

S501. The session management function entity selects the target userplane function entity to serve a terminal.

S502. The session management function entity sends a first message tothe control device, such that the control device receives the firstmessage from the session management function entity.

S503. The control device sends indication information of a first AS tothe session management function entity, such that the session managementfunction entity receives the indication information of the first AS fromthe control device.

Optionally, in this embodiment of this application, the indicationinformation of the first AS may be location information of the first AS,identifier information of the first AS, information indicating that theAS does not change, or the like. This is not specifically limited inthis embodiment of this application.

S504. The session management function entity sends a first routing ruleto the target user plane function entity based on the indicationinformation of the first AS, such that the target user plane functionentity receives the first routing rule from the session managementfunction entity, where the first routing rule includes that data whosedestination address is an address of the first AS is sent to the firstAS.

For a related description of the routing rule, refer to the descriptionsin the preface part of the embodiments. Details are not described hereinagain.

According to the service continuity implementation method provided inthis embodiment of this application, in one aspect, after the sessionmanagement function entity selects the target user plane function entityto serve the terminal, the session management function entity mayreceive the indication information of the first AS, and send the firstrouting rule to the target user plane function entity based on theindication information of the first AS, such that the target user planefunction entity can transmit service data according to the first routingrule. Therefore, service continuity can be ensured in a handover processof a user plane function entity. In another aspect, the first routingrule is that the data whose destination address is the address of thefirst AS is sent to the first AS. This prevents the target user planefunction entity from routing the data that is to be sent to the addressof the first AS first to a remote DN and then to the first AS.Therefore, a path from the terminal to the first AS is shortest, andlatency is controllable.

The actions of the session management function entity in steps S501,S502, and S504 may be performed by the processor 401 in thecommunications device 400 shown in FIG. 4 by invoking the applicationprogram code stored in the memory 403. This is not limited in thisembodiment of this application.

The action of the control device in step S03 may be performed by theprocessor 401 in the communications device 400 shown in FIG. 4 byinvoking the application program code stored in the memory 403. This isnot limited in this embodiment of this application.

Then, the service continuity implementation method shown in FIG. 5 isdescribed in detail using an example in which the service continuityimplementation system 10 shown in FIG. 1 is applied to the scenario 1shown in FIG. 2.

It is assumed that in an initial state, a terminal communicates with anAS 1 using an access device (assumed to be a source base station herein)and a local UPF entity 2 (referred to as a source UPF entity herein). Inaddition, the terminal communicates with a remote DN (referred to as anA-DN herein) using the source UPF entity and a remote UPF entity(referred to as an A-UPF entity herein). FIG. 6A and FIG. 6B areschematic flowcharts of a service continuity implementation methodaccording to an embodiment of this application. Interactions between theterminal, the source base station, a target base station, the source UPFentity, a local UPF entity 1 (referred to as a target UPF entityherein), the A-UPF entity, an AMF entity, an SMF entity, an AScontroller, the AS 1, and an AS 2 are involved, and the following stepsare included.

S601. When the terminal moves, the source base station initiates a radiohandover.

For an implementation of initiating an air interface handover by thesource base station, refer to an existing solution. Details are notdescribed herein.

S602. After completing the air interface handover, the target basestation sends a path switch request to the SMF entity, such that the SMFentity receives the path switch request from the target base station.

The path switch request includes N3 tunnel uplink information of thetarget base station, location information of the terminal, and the like.An N3 tunnel of the target base station is a tunnel between the targetbase station and the target UPF entity. The N3 tunnel uplink informationof the target base station may include an endpoint address of the N3tunnel of the target base station on the target base station side, anaddress of the target base station, and the like. This is notspecifically limited in this embodiment of this application.

S603. The SMF entity selects, based on the location information of theterminal, the target UPF entity to serve the terminal.

Optionally, if a location of the terminal goes beyond a service range ofthe source UPF entity, the SMF entity may determine that local UPFentity reselection needs to be performed.

Optionally, the SMF entity may select, based on at least one of thelocation information of the terminal, a service capability of a localUPF entity managed by the SMF entity, or a load status of the local UPFentity managed by the SMF entity, the target UPF entity to serve theterminal. This is not specifically limited in this embodiment of thisapplication.

S604. The SMF entity sends an N4 session establishment request 1 to thetarget UPF entity, such that the target UPF entity receives the N4session establishment request 1 from the SMF entity.

Optionally, the N4 session establishment request 1 may include a secondrouting rule. The second routing rule includes that data whosedestination address is an address of the AS 1 is sent to the source UPFentity.

Optionally, the N4 session establishment request 1 may include firstpath information. The first path information is used to establish aforwarding path between the source UPF entity and the target UPF entity.

The first path information in this embodiment of this application mayinclude first N9 tunnel downlink information of the source UPF entity.Optionally, the first path information in this embodiment of thisapplication may further include first N9 tunnel uplink information ofthe target UPF entity. A first N9 tunnel of the source UPF entity and afirst N9 tunnel of the target UPF entity are tunnels between the sourceUPF entity and the target UPF entity. The first N9 tunnel downlinkinformation of the source UPF entity may include an endpoint address ofthe first N9 tunnel of the source UPF entity on the source UPF entityside, an address of the source UPF entity, and the like. This is notspecifically limited in this embodiment of this application. The firstN9 tunnel uplink information of the target UPF entity may include anendpoint address of the first N9 tunnel of the target UPF entity on thetarget UPF entity side, an address of the target UPF entity, and thelike. This is not specifically limited in this embodiment of thisapplication. The first N9 tunnel downlink information of the source UPFentity may be allocated by the SMF entity, or may be allocated by thesource UPF entity. This is not specifically limited in this embodimentof this application. The first N9 tunnel uplink information of thetarget UPF entity may be allocated by the SMF entity, or may beallocated by the target UPF entity. This is not specifically limited inthis embodiment of this application.

Optionally, the N4 session establishment request 1 may include a thirdrouting rule. The third routing rule includes that data whosedestination address is an address of the A-DN or data whose destinationaddress is default is sent to the A-UPF entity.

Optionally, the N4 session establishment request 1 may include thirdpath information. The third path information is used to establish aforwarding path between the target UPF entity and the A-UPF entity.

The third path information in this embodiment of this application mayinclude second N9 tunnel downlink information of the A-UPF entity.Optionally, the third path information in this embodiment of thisapplication may further include second N9 tunnel uplink information ofthe target UPF entity. A second N9 tunnel of the A-UPF entity and asecond N9 tunnel of the target UPF entity are tunnels between the A-UPFentity and the target UPF entity. The second N9 tunnel downlinkinformation of the A-UPF entity may include an endpoint address of thesecond N9 tunnel of the A-UPF entity on the A-UPF entity side, anaddress of the A-UPF entity, and the like. This is not specificallylimited in this embodiment of this application. The second N9 tunneluplink information of the target UPF entity may include an endpointaddress of the second N9 tunnel of the target UPF entity on the targetUPF entity side, the address of the target UPF entity, and the like.This is not specifically limited in this embodiment of this application.The second N9 tunnel downlink information of the A-UPF entity may beallocated by the SMF entity, or may be allocated by the A-UPF entity.This is not specifically limited in this embodiment of this application.The second N9 tunnel uplink information of the target UPF entity may beallocated by the SMF entity, or may be allocated by the target UPFentity. This is not specifically limited in this embodiment of thisapplication.

Optionally, the N4 session establishment request 1 may include seventhpath information. The seventh path information is used to establish aforwarding path between the target UPF entity and the target basestation.

The seventh path information in this embodiment of this application mayinclude the N3 tunnel uplink information of the target base station inthe path switch request. Optionally, if N3 tunnel downlink informationof the target UPF entity is allocated by the SMF entity, the seventhpath information may further include the N3 tunnel downlink informationof the target UPF entity. This is not specifically limited in thisembodiment of this application. An N3 tunnel of the target UPF entity isa tunnel between the target base station and the target UPF entity. TheN3 tunnel downlink information of the target UPF entity may include anendpoint address of the N3 tunnel of the target UPF entity on the targetUPF entity side, the address of the target UPF entity, and the like.This is not specifically limited in this embodiment of this application.Certainly, the N3 tunnel downlink information of the target UPF entitymay be alternatively allocated by the target UPF entity. This is notspecifically limited in this embodiment of this application.

In addition, the N4 session establishment request 1 may further includeother user plane information of a current PDU session, for example, adata packet statistics collection and reporting rule and a quality ofservice (QoS) rule. This is not specifically limited in this embodimentof this application.

Optionally, the information included in the N4 session establishmentrequest 1 may be sent to the target UPF entity using different messages.This is not specifically limited in this embodiment of this application.

S605. The target UPF entity sends a session establishment response 1 tothe SMF entity, such that the SMF entity receives the sessionestablishment response 1 from the target UPF entity.

S606. The SMF entity sends an N4 session establishment request 2 to thesource UPF entity, such that the source UPF entity receives the N4session establishment request 2 from the SMF entity.

Optionally, the N4 session establishment request 2 may include a fourthrouting rule. The fourth routing rule includes that data whosedestination address is an address of the terminal is sent to the targetUPF entity.

Optionally, the N4 session establishment request 2 may include secondpath information. The second path information is used to establish theforwarding path between the source UPF entity and the target UPF entity.

The second path information in this embodiment of this application mayinclude the first N9 tunnel uplink information of the target UPF entity.Optionally, the second path information in this embodiment of thisapplication may further include the first N9 tunnel downlink informationof the source UPF entity.

Optionally, the N4 session establishment request 2 may further includefirst tunnel deletion indication information. The first tunnel deletionindication information is used to instruct to delete an N3 tunnel of thesource UPF entity or set the N3 tunnel of the source UPF entity toinvalid. The N3 tunnel of the source UPF entity is a tunnel between thesource UPF entity and the source base station.

Optionally, the N4 session establishment request 2 may further includesecond tunnel deletion indication information. The second tunneldeletion indication information is used to instruct to delete a secondN9 tunnel of the source UPF entity or set the second N9 tunnel of thesource UPF entity to invalid. The second N9 tunnel of the source UPFentity is a tunnel between the source UPF entity and the A-UPF entity.

In addition, the N4 session establishment request 2 may further includeother user plane information of the current PDU session, for example,the data packet statistics collection and reporting rule and the QoSrule. This is not specifically limited in this embodiment of thisapplication.

Optionally, the information included in the N4 session establishmentrequest 2 may be sent to the source UPF entity using different messages.This is not specifically limited in this embodiment of this application.

S607. The source UPF entity sends a session establishment response 2 tothe SMF entity, such that the SMF entity receives the sessionestablishment response 2 from the source UPF entity.

It should be noted that, if both the first path information in step S604and the second path information in step S606 include the first N9 tunneldownlink information of the source UPF entity and the first N9 tunneluplink information of the target UPF entity, the first path informationmay be the same as the second path information. Certainly,alternatively, the first path information in step S604 may be differentfrom the second path information in step S606. For example, the firstpath information includes only the first N9 tunnel downlink informationof the source UPF entity, and the second path information includes onlythe first N9 tunnel uplink information of the target UPF entity. This isnot specifically limited in this embodiment of this application.

S608. The SMF entity sends an N4 session establishment request 3 to theA-UPF entity, such that the A-UPF entity receives the N4 sessionestablishment request 3 from the SMF entity.

Optionally, the N4 session establishment request 3 may include thefourth routing rule. The fourth routing rule includes that data whosedestination address is the address of the terminal is sent to the targetUPF entity.

Optionally, the N4 session establishment request 3 may include fourthpath information. The fourth path information is used to establish theforwarding path between the A-UPF entity and the target UPF entity.

The fourth path information in this embodiment of this application mayinclude the second N9 tunnel uplink information of the target UPFentity. Optionally, the fourth path information in this embodiment ofthis application may further include the second N9 tunnel downlinkinformation of the A-UPF entity.

Optionally, the N4 session establishment request 3 may further includesecond tunnel deletion indication information. The second tunneldeletion indication information is used to instruct to delete a first N9tunnel of the A-UPF entity or set the first N9 tunnel of the A-UPFentity to invalid. The first N9 tunnel of the A-UPF entity is a tunnelbetween the source UPF entity and the A-UPF entity.

In addition, the N4 session establishment request 3 may further includeother user plane information of the current PDU session, for example,the data packet statistics collection and reporting rule and the QoSrule. This is not specifically limited in this embodiment of thisapplication.

Optionally, the information included in the N4 session establishmentrequest 3 may be sent to the source UPF entity using different messages.This is not specifically limited in this embodiment of this application.

S609. The A-UPF entity sends a session establishment response 3 to theSMF entity, such that the SMF entity receives the session establishmentresponse 3 from the A-UPF entity.

It should be noted that, if both the third path information in step S604and the fourth path information in step S608 include the second N9tunnel downlink information of the A-UPF entity and the second N9 tunneluplink information of the target UPF entity, the third path informationmay be the same as the fourth path information. Certainly,alternatively, the third path information in step S604 may be differentfrom the fourth path information in step S608. For example, the thirdpath information includes only the second N9 tunnel downlink informationof the A-UPF entity, and the fourth path information includes only thesecond N9 tunnel uplink information of the target UPF entity. This isnot specifically limited in this embodiment of this application.

S610. The SMF entity sends a path switch response to the target basestation, such that the target base station receives the path switchresponse from the SMF entity.

Optionally, the path switch response may include eighth pathinformation. The eighth path information is used to establish theforwarding path between the target base station and the target UPFentity.

The eighth path information in this embodiment of this application mayinclude the N3 tunnel downlink information of the target UPF entity.Optionally, the eighth path information in this embodiment of thisapplication may further include the N3 tunnel uplink information of thetarget base station.

In addition, the path switch response may further include other userplane information of the current PDU session, for example, the datapacket statistics collection and reporting rule and the QoS rule. Thisis not specifically limited in this embodiment of this application.

Optionally, the information included in the path switch response may besent to the target base station using different messages. This is notspecifically limited in this embodiment of this application.

It should be noted that, if both the seventh path information in stepS604 and the eighth path information in step S610 include the N3 tunneldownlink information of the target UPF entity and the N3 tunnel uplinkinformation of the target base station, the seventh path information maybe the same as the eighth path information. Certainly, alternatively,the seventh path information in step S604 may be different from theeighth path information in step S610. For example, the seventh pathinformation includes only the N3 tunnel uplink information of the targetbase station, and the second path information includes only the N3tunnel downlink information of the target UPF entity. This is notspecifically limited in this embodiment of this application.

S611. The target base station releases a source base station resource.

For an implementation of releasing the source base station resource bythe target base station, refer to an existing solution. Details are notdescribed herein.

In conclusion, step S604 to step S611 may be performed to delete thetunnel between the source UPF entity and the source base station and thetunnel between the source UPF entity and the A-UPF entity.

Step S604 to step S611 may be performed to establish: the tunnel betweenthe source UPF entity and the target UPF entity and the tunnel betweenthe target UPF entity and the A-UPF entity.

In other words, the target UPF entity can be added to the current PDUsession by performing step S604 to step S611. In this way, communicationbetween the terminal and the AS 1 can be maintained. In this case, thetarget UPF entity may be considered as a common hop of UPF entity on aPDU session path. Corresponding service transmission paths are:

the terminal <-> the target base station <-> the target UPF entity <->the source UPF entity <-> the AS 1; and

the terminal <-> the target base station <-> the target UPF entity <->the A-UPF entity <-> the A-DN.

It should be noted that there is no necessary sequence for performingsteps S604 and S605, steps S606 and S607, and steps S608 and S609. Anygroup of steps in steps S604 and S605, steps S606 and S607, and stepsS608 and S609 may be first performed, then any group of steps in theother two groups of steps may be performed, and finally the last groupof steps may be performed. For example, steps S604 and S605 may beperformed first, then steps S606 and S607 may be performed, and finallysteps S608 and S609 may be performed. Certainly, alternatively, stepsS604 and S605, steps S606 and S607, and steps S608 and S609 may beperformed simultaneously. This is not specifically limited in thisembodiment of this application.

It should be noted that step S604 to step S610 are described using anexample in which an N9 tunnel (including the tunnel between the sourceUPF entity and the target UPF entity and the tunnel between the targetUPF entity and the A-UPF entity) is an N9 tunnel at a sessiongranularity. Certainly, alternatively, the N9 tunnel may be an N9 tunnelat a device granularity. This is not specifically limited in thisembodiment of this application.

When the N9 tunnel is the N9 tunnel at a device granularity, if no N9tunnel at a device granularity exists, the N9 tunnel at a devicegranularity is established in the foregoing manner of establishing theN9 tunnel at a session granularity.

If the N9 tunnel at a device granularity exists, the N9 tunnel at adevice granularity may not need to be established, and only a routingrule corresponding to the PDU session is delivered. For example, the SMFentity sends the second routing rule to the target UPF entity, such thatthe target UPF entity can send the data whose destination address is theaddress of the AS 1 to the source UPF entity through the tunnel betweenthe source UPF entity and the target UPF entity. Alternatively, forexample, the SMF entity sends the fourth routing rule to the source UPFentity, such that the source UPF entity may send the data whosedestination address is the address of the terminal to the target UPFentity through the tunnel between the source UPF entity and the targetUPF entity. Alternatively, for example, the SMF entity sends the thirdrouting rule to the target UPF entity, such that the target UPF entitymay send the data whose destination address is the address of the A-DNto the A-UPF entity through the tunnel between the target UPF entity andthe A-UPF entity. Alternatively, for example, the SMF entity sends thefourth routing rule to the A-UPF entity, such that the A-UPF entity maysend the data whose destination address is the address of the terminalto the target UPF entity through the tunnel between the target UPFentity and the A-UPF entity.

When the N9 tunnel is the N9 tunnel at a device granularity, the N9tunnel at a device granularity usually does not exist, and needs to benewly established in the following scenarios:

1. the source UPF entity or the target UPF entity is powered on;

2. a 1^(st) routing rule corresponding to the N9 tunnel at a devicegranularity needs to be established; and

3. other cases.

S612. The SMF entity sends a first message to the AS controller, suchthat the AS controller receives the first message from the SMF entity.

Optionally, the first message in this embodiment of this application maybe a PDU session change message.

Optionally, in this embodiment of this application, the first messagemay include at least one of location information of the target UPFentity or location information of the terminal. At least one of thelocation information of the target UPF entity or the locationinformation of the terminal is used to determine that an AS serving theterminal is the AS 2.

Optionally, the SMF entity may determine, according to a local policy,that the first message needs to be sent to the AS controller. The localpolicy may include a service type or a 5G QoS identifier (5QI).

Alternatively, the SMF entity may subscribe to such a type of message.Further, after the UPF entity changes, the SMF entity is triggered tosend the first message to the AS controller. This is not specificallylimited in this embodiment of this application.

Optionally, in this embodiment of this application, the SMF entity maydirectly communicate with the AS controller, or may communicate with theAS controller using a network exposure function (NEF) entity or a policycontrol function (PCF) entity. A general description is provided herein,and details are not described below again.

It should be noted that there is no necessary sequence for performingstep S612 and steps S604 to S611. Step S612 may be performed beforesteps S604 to S611. Alternatively, steps S604 to S611 may be performedbefore step S612. Alternatively, step S612 and steps S604 to S611 may beperformed simultaneously. This is not specifically limited in thisembodiment of this application.

S613. The AS controller determines, based on the first message, that theAS serving the terminal is the AS 2.

Optionally, the AS controller may determine, based on at least one ofthe location information of the target UPF entity or the locationinformation of the terminal included in the first message, that the ASserving the terminal is the AS 2.

S614. The AS controller sends an AS synchronization request to the AS 1,such that the AS 1 receives the AS synchronization request from the AScontroller, where the AS synchronization request is used to request theAS 1 to synchronize information about the terminal to the AS 2.

The synchronized information about the terminal may include serviceauthentication information, historical data, a context, and the like.This is not specifically limited in this embodiment of this application.

It should be noted that the AS synchronization request in thisembodiment of this application may also have another name, and the namedoes not constitute a limitation on the message. For example, the ASsynchronization request may also be referred to as an AS handoverrequest. A general description is provided herein, and details are notdescribed below again.

S615. The AS 1 synchronizes the information about the terminal to the AS2.

S616. The AS 1 sends an AS synchronization response to the AScontroller, such that the AS controller receives the AS synchronizationresponse from the AS 1, where the synchronization response is used toindicate that synchronization between the AS 1 and the AS 2 has beencompleted.

Optionally, the AS 2 may send an AS synchronization response to the AScontroller, such that the AS controller receives the AS synchronizationresponse from the AS 2, where the AS synchronization response is used toindicate that synchronization between the AS 1 and the AS 2 has beencompleted. This is not specifically limited in this embodiment of thisapplication.

It should be noted that the AS synchronization response in thisembodiment of this application may also have another name, and the namedoes not constitute a limitation on the message. For example, the ASsynchronization response may also be referred to as an AS handoverresponse. A general description is provided herein, and details are notdescribed below again.

S617. The AS controller sends indication information of the AS 2 to theSMF entity, such that the SMF entity receives the indication informationof the AS 2 from the AS controller.

Optionally, the indication information of the AS 2 may be locationinformation of the AS 2.

S618. The SMF entity sends an offloading rule update request to thetarget UPF entity, such that the target UPF entity receives theoffloading rule update request from the SMF entity, where the offloadingrule update request includes a first routing rule, and the first routingrule includes that data whose destination address is an address of theAS 2 is sent to the AS 2.

Further, after receiving the offloading rule update request from the SMFentity, the target UPF entity may add the first routing rule to a localoffloading rule. In this way, the target UPF entity can send the datawhose destination address is the address of the AS 2 to the AS 2. Thisprevents the target UPF entity from sending the data that is to be sentto the address of the AS 2 first to the A-UPF entity according to a ULCLdefault rule and then to the AS 2 using the A-DN. Therefore, a path fromthe terminal to the AS 2 is shortest, and latency is controllable.

In addition, the local offloading rule of the target UPF entity furtherincludes the second routing rule and the third routing rule. Therefore,the target UPF entity still transmits data according to the servicetransmission paths in step S610, that is, still sends the data whosedestination address is the AS 1 to the source UPF entity, and sendsanother data packet to the A-UPF entity according to a default rule.This is not specifically limited in this embodiment of this application.

In this case, corresponding service transmission paths are:

the terminal <-> the target base station <-> the target UPF entity <->the AS 2;

the terminal <-> the target base station <-> the target UPF entity <->the source UPF entity <-> the AS 1; and

the terminal <-> the target base station <-> the target UPF entity <->the A-UPF entity <-> the A-DN.

S619. The target UPF entity sends an offloading rule update response tothe SMF entity, such that the AS controller receives the offloading ruleupdate response from the SMF entity, where the offloading rule updateresponse is used to indicate that the local offloading rule has beenestablished and that a network-side path has been ready.

S620. The SMF entity sends a seventh message to the AS controller, suchthat the AS controller receives the seventh message from the SMF entity,where the seventh message is used to instruct to switch the terminalfrom the AS 1 to the AS 2.

S621. The AS controller switches the terminal from the AS 1 to the AS 2based on the seventh message.

S622. The AS controller sends an eighth message to the SMF entity, suchthat the SMF entity receives the eighth message from the AS controller,where the eighth message is used to indicate that the terminal has beenswitched from the AS 1 to the AS 2.

S623. The SMF entity sends an N4 session modification request to thetarget UPF entity, such that the target UPF entity receives the N4session modification request from the SMF entity.

Optionally, when the N9 tunnel is the N9 tunnel at a sessiongranularity, the N4 session modification request may include firstindication information, where the first indication information is usedto instruct to delete the second routing rule and the first pathinformation, that is, delete the tunnel between the source UPF entityand the target UPF entity.

Optionally, when the N9 tunnel is the N9 tunnel at a device granularity,there are the following two possible implementation manners.

Manner 1: On the target UPF entity, in addition to the second routingrule, if there is another routing rule corresponding to the tunnelbetween the source UPF entity and the target UPF entity, the N4 sessionmodification request may include second indication information, wherethe second indication information is used to instruct to delete thesecond routing rule.

Alternatively, on the target UPF entity, if there is no other routingrule corresponding to the tunnel between the source UPF entity and thetarget UPF entity except the second routing rule, the N4 sessionmodification request may include first indication information, where thefirst indication information is used to instruct to delete the secondrouting rule and the first path information, that is, delete the tunnelbetween the source UPF entity and the target UPF entity.

Manner 2: On the target UPF entity, in addition to the second routingrule, regardless of whether there is another routing rule correspondingto the tunnel between the source UPF entity and the target UPF entity,the N4 session modification request includes only second indicationinformation, where the second indication information is used to instructto delete the second routing rule. In other words, when the N9 tunnel isthe tunnel at a device granularity, and a user plane resource isreleased, the tunnel at a device granularity is not released, and onlythe routing rule corresponding to the current PDU session is deleted.

For related descriptions of the second routing rule and the first pathinformation, refer to step S604. Details are not described herein again.

Optionally, the information included in the N4 session modificationrequest may be sent to the target UPF entity using different messages.This is not specifically limited in this embodiment of this application.

S624. The target UPF entity sends an N4 session modification response tothe SMF entity, such that the SMF entity receives the N4 sessionmodification response from the target UPF entity.

S625. The SMF entity sends an N4 session release request to the sourceUPF entity, such that the source UPF entity receives the N4 sessionrelease request from the SMF entity.

The N4 session release request is used to request to delete user planeinformation, corresponding to the terminal, on the source UPF entity.

Optionally, when the N9 tunnel is the N9 tunnel at a sessiongranularity, the N4 session release request may include third indicationinformation, where the third indication information is used to instructto delete the fourth routing rule and the second path information, thatis, delete the tunnel between the source UPF entity and the target UPFentity.

Optionally, when the N9 tunnel is the N9 tunnel at a device granularity,there are the following two possible implementation manners.

Manner 1: On the source UPF entity, in addition to the fourth routingrule, if there is another routing rule corresponding to the tunnelbetween the source UPF entity and the target UPF entity, the N4 sessionrelease request may include fourth indication information, where thefourth indication information is used to instruct to delete the fourthrouting rule.

Alternatively, on the source UPF entity, if there is no other routingrule corresponding to the tunnel between the source UPF entity and thetarget UPF entity except the fourth routing rule, the N4 session releaserequest may include third indication information, where the thirdindication information is used to instruct to delete the fourth routingrule and the second path information, that is, delete the tunnel betweenthe source UPF entity and the target UPF entity.

Manner 2: On the source UPF entity, in addition to the fourth routingrule, regardless of whether there is another routing rule correspondingto the tunnel between the source UPF entity and the target UPF entity,the N4 session release request includes only fourth indicationinformation, where the fourth indication information is used to instructto delete the fourth routing rule. In other words, when the N9 tunnel isthe tunnel at a device granularity, and a user plane resource isreleased, the tunnel at a device granularity is not released, and onlythe routing rule corresponding to the current PDU session is deleted.

For related descriptions of the fourth routing rule and the second pathinformation, refer to step S606. Details are not described herein again.

Optionally, in addition to the fourth routing rule and the second pathinformation, the user plane information corresponding to the terminalmay further include a packet detection rule, a QoS rule, and the like.This is not specifically limited in this embodiment of this application.

Optionally, the information included in the N4 session release requestmay be sent to the source UPF entity using different messages. This isnot specifically limited in this embodiment of this application.

S626. The source UPF entity sends an N4 session release response to theSMF entity, such that the SMF entity receives the N4 session releaseresponse from the source UPF entity.

In conclusion, step S623 to step S626 may be performed to delete thetunnel between the source UPF entity and the target UPF entity. In thiscase, communication between the terminal and the AS 1 ends.Corresponding service transmission paths are:

the terminal <-> the target base station <-> the target UPF entity <->the AS 2; and

the terminal <-> the target base station <-> the target UPF entity <->the A-UPF entity <-> the A-DN.

It should be noted that there is no necessary sequence for performingsteps S623 and S624 and steps S625 and S626. Steps S623 and S624 may beperformed before steps S625 and S626. Alternatively, steps S625 and S626may be performed before steps S623 and S624. Alternatively, steps S623and S624 and steps S625 and S626 may be performed simultaneously. Thisis not specifically limited in this embodiment of this application.

According to the service continuity implementation method provided inthis embodiment of this application, in one aspect, after the SMF entityselects the target UPF entity to serve the terminal, the SMF entity mayreceive the indication information of the AS 2, and send the firstrouting rule to the target UPF entity based on the indicationinformation of the AS 2, such that the target UPF entity can transmitservice data according to the first routing rule after the terminal isswitched from the AS 1 to the AS 2. In addition, before the terminal isswitched from the AS 1 to the AS 2, the SMF entity may continue tomaintain a service connection between the terminal and the AS 1.Therefore, seamless service data handover can be implemented in ascenario in which both a handover of the UPF entity and a handover ofthe AS entity occur, to ensure service continuity in a handover process.In another aspect, the first routing rule is that the data whosedestination address is the AS 2 is sent to the AS 2. This can preventthe target UPF entity from routing the data that is to be sent to theaddress of the AS 2 first to the A-DN and then to the AS 2. Therefore,the path from the terminal to the AS 2 is shortest, and the latency iscontrollable.

The actions of the SMF entity in steps S603, S604, S606, S608, S610,S612, S618, S620, S621, S623, and S625 may be performed by the processor401 in the communications device 400 shown in FIG. 4 by invoking theapplication program code stored in the memory 403. This is not limitedin this embodiment of this application.

The actions of the AS controller in steps S613, S614, S617, S621, andS622 may be performed by the processor 401 in the communications device400 shown in FIG. 4 by invoking the application program code stored inthe memory 403. This is not limited in this embodiment of thisapplication.

Optionally, it is assumed that in an initial state, a terminalcommunicates with an AS 1 using an access device (assumed to be a sourcebase station herein) and a local UPF entity 2 (referred to as a sourceUPF entity herein). In addition, the terminal communicates with a remoteDN (referred to as an A-DN herein) using the source UPF entity and aremote UPF entity (referred to as an A-UPF entity herein). FIG. 7A andFIG. 7B are a schematic flowchart of another service continuityimplementation method according to an embodiment of this application.Interactions between the terminal, the source base station, a targetbase station, the source UPF entity, a local UPF entity 1 (referred toas a target UPF entity herein), the A-UPF entity, an AMF entity, an SMFentity, an AS controller, and the AS 1 are involved, and the followingsteps are included.

Steps S701 to S712 are the same as steps S601 to S612. For details,refer to the embodiment shown in FIG. 6A and FIG. 6B. Details are notdescribed herein again.

S713. The AS controller determines, based on the first message, that theAS serving the terminal is the AS 1.

Optionally, the AS controller may determine, based on at least one ofthe location information of the target UPF entity or the locationinformation of the terminal included in the first message, that the ASserving the terminal is the AS 1.

S714. The AS controller sends indication information of the AS 1 to theSMF entity, such that the SMF entity receives the indication informationof the AS 1 from the AS controller.

Optionally, the indication information of the AS 1 may be locationinformation of the AS 1, identifier information of the AS 1, informationindicating that the AS 1 does not change, or the like. This is notspecifically limited in this embodiment of this application.

After receiving the indication information of the AS 1 from the AScontroller, the SMF entity may determine, based on the indicationinformation of the AS 1, that a handover of the AS does not occur. Forexample, if the indication information of the AS 1 is the locationinformation of the AS 1, the location information of the AS 1 may becompared with location information of a current AS; and if the locationinformation of the AS 1 is the same as the location information of thecurrent AS, it is determined that the handover of the AS does not occur.

S715. The SMF entity sends an N4 session modification request to thetarget UPF entity, such that the target UPF entity receives the N4session modification request from the SMF entity.

The N4 session modification request includes a first routing rule. Thefirst routing rule includes that data whose destination address is anaddress of the AS 1 is sent to the AS 1. Further, after receiving thefirst routing rule from the SMF entity, the target UPF entity may addthe first routing rule to a local offloading rule.

Optionally, when the N9 tunnel is the N9 tunnel at a sessiongranularity, the N4 session modification request may include firstindication information, where the first indication information is usedto instruct to delete the second routing rule and the first pathinformation, that is, delete the tunnel between the source UPF entityand the target UPF entity.

Optionally, when the N9 tunnel is the N9 tunnel at a device granularity,there are the following two possible implementation manners.

Manner 1: On the target UPF entity, in addition to the second routingrule, if there is another routing rule corresponding to the tunnelbetween the source UPF entity and the target UPF entity, the N4 sessionmodification request may include second indication information, wherethe second indication information is used to instruct to delete thesecond routing rule.

Alternatively, on the target UPF entity, if there is no other routingrule corresponding to the tunnel between the source UPF entity and thetarget UPF entity except the second routing rule, the N4 sessionmodification request may include first indication information, where thefirst indication information is used to instruct to delete the secondrouting rule and the first path information, that is, delete the tunnelbetween the source UPF entity and the target UPF entity.

Manner 2: On the target UPF entity, in addition to the second routingrule, regardless of whether there is another routing rule correspondingto the tunnel between the source UPF entity and the target UPF entity,the N4 session modification request includes only second indicationinformation, where the second indication information is used to instructto delete the second routing rule. In other words, when the N9 tunnel isthe tunnel at a device granularity, and a user plane resource isreleased, the tunnel at a device granularity is not released, and onlythe routing rule corresponding to the current PDU session is deleted.

For related descriptions of the second routing rule and the first pathinformation, refer to step S704. Details are not described herein again.

Optionally, the information included in the N4 session modificationrequest may be sent to the target UPF entity using different messages.This is not specifically limited in this embodiment of this application.

S716. The target UPF entity sends an N4 session modification response tothe SMF entity, such that the SMF entity receives the N4 sessionmodification response from the target UPF entity.

The first indication information or the second indication information instep S715 is used to instruct to delete the second routing rule.Therefore, the target UPF entity can directly send the data whosedestination address is the address of the AS 1 to the AS 1, withoutforwarding by the source UPF entity. In this way, a path from theterminal to the AS 1 is shortest, and latency is controllable.

In addition, the local offloading rule of the target UPF entity furtherincludes the third routing rule. Therefore, the target UPF entity stillsends another data packet to the A-UPF entity according to a defaultrule. This is not specifically limited in this embodiment of thisapplication.

In this case, corresponding service transmission paths are:

the terminal <-> the target base station <-> the target UPF entity <->the AS 1; and

the terminal <-> the target base station <-> the target UPF entity <->the A-UPF entity <-> the A-DN.

S717. The SMF entity sends an N4 session release request to the sourceUPF entity, such that the source UPF entity receives the N4 sessionrelease request from the SMF entity.

The N4 session release request is used to request to delete user planeinformation, corresponding to the terminal, on the source UPF entity.

Optionally, when the N9 tunnel is the N9 tunnel at a sessiongranularity, the N4 session modification request may include thirdindication information, where the third indication information is usedto instruct to delete the fourth routing rule and the second pathinformation, that is, delete the tunnel between the source UPF entityand the target UPF entity.

Optionally, when the N9 tunnel is the N9 tunnel at a device granularity,there are the following two possible implementation manners.

Manner 1: On the source UPF entity, in addition to the fourth routingrule, if there is another routing rule corresponding to the tunnelbetween the source UPF entity and the target UPF entity, the N4 sessionrelease request may include fourth indication information, where thefourth indication information is used to instruct to delete the fourthrouting rule.

Alternatively, on the source UPF entity, if there is no other routingrule corresponding to the tunnel between the source UPF entity and thetarget UPF entity except the fourth routing rule, the N4 session releaserequest may include third indication information, where the thirdindication information is used to instruct to delete the fourth routingrule and the second path information, that is, delete the tunnel betweenthe source UPF entity and the target UPF entity.

Manner 2: On the source UPF entity, in addition to the fourth routingrule, regardless of whether there is another routing rule correspondingto the tunnel between the source UPF entity and the target UPF entity,the N4 session release request includes only fourth indicationinformation, where the fourth indication information is used to instructto delete the fourth routing rule. In other words, when the N9 tunnel isthe tunnel at a device granularity, and a user plane resource isreleased, the tunnel at a device granularity is not released, and onlythe routing rule corresponding to the current PDU session is deleted.

For related descriptions of the fourth routing rule and the second pathinformation, refer to step S706. Details are not described herein again.

Optionally, in addition to the fourth routing rule and the second pathinformation, the user plane information corresponding to the terminalmay further include a packet detection rule, a QoS rule, and the like.This is not specifically limited in this embodiment of this application.

Optionally, the information included in the N4 session release requestmay be sent to the source UPF entity using different messages. This isnot specifically limited in this embodiment of this application.

S718. The source UPF entity sends an N4 session release response to theSMF entity, such that the SMF entity receives the N4 session releaseresponse from the source UPF entity.

Step S715 to step S718 may be performed to delete the tunnel between thesource UPF entity and the target UPF entity.

It should be noted that there is no necessary sequence for performingsteps S715 and S716 and steps S717 and S718. Steps S717 and S718 may beperformed before steps S715 and S716. Alternatively, steps S715 and S716may be performed before steps S717 and S718.

Alternatively, steps S715 and S716 and steps S717 and S718 may beperformed simultaneously. This is not specifically limited in thisembodiment of this application.

According to the service continuity implementation method provided inthis embodiment of this application, in one aspect, after the SMF entityselects the target UPF entity to serve the terminal, the SMF entity mayreceive the indication information of the AS 1, and send the firstrouting rule to the target UPF entity based on the indicationinformation of the AS 1, such that the target UPF entity can transmitservice data according to the first routing rule. In addition, beforethe AS controller determines whether the handover of the AS occurs, theSMF entity may continue to maintain a service connection between theterminal and the AS 1. Therefore, seamless service data handover can beimplemented in a scenario in which a handover of the UPF entity occurs,to ensure service continuity in a handover process. In another aspect,the first routing rule is that the data whose destination address is theAS 1 is sent to the AS 1. This can prevent the target UPF entity fromrouting the data that is to be sent to the address of the AS 1 first tothe A-DN and then to the AS 1. Therefore, the path from the terminal tothe AS 1 is shortest, and the latency is controllable.

The actions of the SMF entity in steps S703, S704, S706, S708, S710,S712, S715, and S717 may be performed by the processor 401 in thecommunications device 400 shown in FIG. 4 by invoking the applicationprogram code stored in the memory 403. This is not limited in thisembodiment of this application.

The actions of the AS controller in steps S713 and S714 may be performedby the processor 401 in the communications device 400 shown in FIG. 4 byinvoking the application program code stored in the memory 403. This isnot limited in this embodiment of this application.

The following describes in detail the service continuity implementationmethod shown in FIG. 5 using an example in which the service continuityimplementation system 10 shown in FIG. 1 is applied to the scenario 2shown in FIG. 3.

It is assumed that in an initial state, a terminal communicates with anAS 1 using an access device (assumed to be a source base station herein)and a UPF entity 2 (referred to as a source UPF entity herein). FIG. 8Aand FIG. 8B are schematic flowcharts of a service continuityimplementation method according to an embodiment of this application.Interactions between the terminal, the source base station, a targetbase station, the source UPF entity, a UPF entity 1 (referred to as atarget UPF entity herein), an AMF entity, an SMF entity, an AScontroller, the AS 1, and an AS 2 are involved, and the following stepsare included.

Steps S801 and S802 are the same as steps S601 and S602. For details,refer to the embodiment shown in FIG. 6A and FIG. 6B. Details are notdescribed herein again.

S803. The SMF entity determines that UPF entity reselection needs to beperformed.

Optionally, if a location of the terminal goes beyond a service range ofthe source UPF entity, the SMF entity may determine that local UPFentity reselection needs to be performed.

S804. The SMF entity sends an N4 session establishment request to thesource UPF entity, such that the source UPF entity receives the N4session establishment request from the SMF entity.

Optionally, the N4 session establishment request may include a fifthrouting rule. The fifth routing rule includes that data whosedestination address is an address of the terminal is sent to the targetbase station.

Optionally, the N4 session establishment request may include ninth pathinformation. The ninth path information is used to establish aforwarding path between the source UPF entity and the base station.

The ninth path information in this embodiment of this application mayinclude N3 tunnel uplink information of the target base station in thepath switch request in step S802. Optionally, the ninth path informationin this embodiment of this application may further include N3 tunneldownlink information of the source UPF entity. An N3 tunnel of thesource UPF entity and an N3 tunnel of the target base station aretunnels between the source UPF entity and the target base station. TheN3 tunnel uplink information of the target base station may include anendpoint address of the N3 tunnel of the target base station on thetarget base station side, an address of the target base station, and thelike. This is not specifically limited in this embodiment of thisapplication. The N3 tunnel downlink information of the source UPF entitymay include an endpoint address of the N3 tunnel of the source UPFentity on the source UPF entity side, an address of the source UPFentity, and the like. This is not specifically limited in thisembodiment of this application. The N3 tunnel downlink information ofthe source UPF entity may be allocated by the SMF entity, or may beallocated by the source UPF entity. This is not specifically limited inthis embodiment of this application.

Optionally, the N4 session establishment request may further includefirst tunnel deletion indication information. The first tunnel deletionindication information is used to instruct to delete the N3 tunnel ofthe source UPF entity or set the N3 tunnel of the source UPF entity toinvalid. The N3 tunnel of the source UPF entity is a tunnel between thesource UPF entity and the source base station.

In addition, the N4 session establishment request may further includeother user plane information of a current PDU session, for example, adata packet statistics collection and reporting rule and a QoS rule.This is not specifically limited in this embodiment of this application.

Optionally, the information included in the N4 session establishmentrequest may be sent to the source UPF entity using different messages.This is not specifically limited in this embodiment of this application.

S805. The source UPF entity sends a session establishment response tothe SMF entity, such that the SMF entity receives the sessionestablishment response from the source UPF entity.

S806. The SMF entity sends a path switch response to the target basestation, such that the target base station receives the path switchresponse from the SMF entity.

Optionally, the path switch response may include tenth path information.The tenth path information is used to establish the forwarding pathbetween the target base station and the source UPF entity.

The tenth path information in this embodiment of this application mayinclude the N3 tunnel downlink information of the source UPF entity.Optionally, the tenth path information in this embodiment of thisapplication may further include the N3 tunnel uplink information of thetarget base station.

In addition, the path switch response may further include other userplane information of the current PDU session, for example, the datapacket statistics collection and reporting rule and the QoS rule. Thisis not specifically limited in this embodiment of this application.

Optionally, the information included in the path switch response may besent to the target base station using different messages. This is notspecifically limited in this embodiment of this application.

It should be noted that, if both the ninth path information in step S804and the tenth path information in step S806 include the N3 tunneldownlink information of the source UPF entity and the N3 tunnel uplinkinformation of the target base station, the ninth path information maybe the same as the tenth path information. Certainly, alternatively, theninth path information in step S804 may be different from the tenth pathinformation in step S806. For example, the ninth path informationincludes only the N3 tunnel uplink information of the target basestation, and the tenth path information includes only the N3 tunneldownlink information of the source UPF entity. This is not specificallylimited in this embodiment of this application.

S807. The target base station releases a source base station resource.

For an implementation of releasing the source base station resource bythe target base station, refer to an existing solution. Details are notdescribed herein.

In conclusion, step S804 to step S807 may be performed to delete thetunnel between the source UPF entity and the source base station.

Step S804 to step S806 may be performed to establish the tunnel betweenthe source UPF entity and the target base station.

In other words, communication between the terminal and the AS 1 can bemaintained by performing step S804 to step S807. In this case, acorresponding service transmission path is:

the terminal <-> the target base station <-> the source UPF entity <->the AS 1.

S808. The SMF entity sends a PDU session re-establishment notificationto the terminal, such that the terminal receives the PDU sessionre-establishment notification from the SMF entity, where the PDU sessionre-establishment notification includes an identifier of ato-be-re-established PDU session (PDU session ID).

It should be noted that there is no necessary sequence for performingsteps S804 to S807 and step S808. Steps S804 to S807 may be performedbefore step S808. Alternatively, step S808 may be performed before stepsS804 to S807. Alternatively, steps S804 to S807 and step S808 may beperformed simultaneously. This is not specifically limited in thisembodiment of this application.

S809. The terminal initiates a procedure of establishing a new PDUsession (referred to as a second PDU session herein), where the SMFentity selects, in a process of establishing the second PDU session, thetarget UPF entity to serve the terminal.

Optionally, in the process of establishing the second PDU session, theterminal may send an identifier of the second PDU session and anidentifier of an old PDU session (referred to as a first PDU sessionherein) to the SMF entity, such that the SMF entity receives theidentifier of the first PDU session and the identifier of the second PDUsession from the terminal, and maintains a mapping relationship betweenthe first PDU session and the second PDU session based on the identifierof the first PDU session and the identifier of the second PDU session.This is not specifically limited in this embodiment of this application.

Steps S810 to S815 are the same as steps S612 to S617. For details,refer to the embodiment shown in FIG. 6A and FIG. 6B. Details are notdescribed herein again.

S816. The SMF entity sends an N4 session modification request to thetarget UPF entity, such that the target UPF entity receives the N4session modification request from the SMF entity.

The N4 session modification request includes a first routing rule. Thefirst routing rule includes that data whose destination address is anaddress of the AS 2 is sent to the AS 2.

S817. The target UPF entity sends an N4 session modification response tothe SMF entity, such that the SMF entity receives the N4 sessionmodification response from the target UPF entity, where the N4 sessionmodification response is used to indicate that establishment of abottom-layer network pipeline between the terminal and the AS 2 iscompleted.

Currently, there are two sessions: the first PDU session and the secondPDU session. Therefore, currently, corresponding service transmissionnpaths are:

the terminal <-> the target base station <-> the source UPF entity <->the AS 1, and

the terminal <-> the target base station <-> the target UPF entity <->the AS 2.

Steps S818 to S820 are the same as steps S620 to S622. For details,refer to the embodiment shown in FIG. 6A and FIG. 6B. Details are notdescribed herein again.

S821. The SMF entity sends a sixth message to the terminal, such thatthe terminal receives the sixth message from the SMF entity, where thesixth message is used to instruct the terminal to release the first PDUsession.

S822. The terminal releases the first PDU session based on the sixthmessage.

For a procedure of releasing the first PDU session by the terminal,refer to other approaches. Details are not described herein.

According to the service continuity implementation method provided inthis embodiment of this application, in one aspect, after the SMF entityselects the target UPF entity to serve the terminal, the SMF entity mayreceive the indication information of the AS 2, and send the firstrouting rule to the target UPF entity based on the indicationinformation of the AS 2, such that the target UPF entity can transmitservice data according to the first routing rule after the terminal isswitched from the AS 1 to the AS 2. In addition, before the terminal isswitched from the AS 1 to the AS 2, the SMF entity may continue tomaintain a service connection between the terminal and the AS 1.Therefore, seamless service data handover can be implemented in ascenario in which both a handover of the UPF entity and a handover ofthe AS entity occur, to ensure service continuity in a handover process.In another aspect, the first routing rule is that the data whosedestination address is the AS 2 is sent to the AS 2. This can preventthe target UPF entity from routing the data that is to be sent to theaddress of the AS 2 first to a remote DN and then to the AS 2.Therefore, a path from the terminal to the AS 2 is shortest, and latencyis controllable.

The actions of the SMF entity in steps S803, S804, S806, S808, S809,S810, S816, S818, S819, S821, and S822 may be performed by the processor401 in the communications device 400 shown in FIG. 4 by invoking theapplication program code stored in the memory 403. This is not limitedin this embodiment of this application.

The actions of the AS controller in steps S811, S812, S815, S819, andS820 may be performed by the processor 401 in the communications device400 shown in FIG. 4 by invoking the application program code stored inthe memory 403. This is not limited in this embodiment of thisapplication.

Optionally, it is assumed that in an initial state, a terminalcommunicates with an AS 1 using an access device (assumed to be a sourcebase station herein) and a UPF entity 2 (referred to as a source UPFentity herein). FIG. 9A and FIG. 9B are a schematic flowchart of aservice continuity implementation method according to an embodiment ofthis application. Interactions between the terminal, the source basestation, a target base station, the source UPF entity, a UPF entity 1(referred to as a target UPF entity herein), an AMF entity, an SMFentity, an AS controller, and the AS 1 are involved, and the followingsteps are included.

Steps S901 to S910 are the same as steps S801 to S810. For details,refer to the embodiment shown in FIG. 8A and FIG. 8B. Details are notdescribed herein again.

S911. The AS controller determines, based on the first message, that theAS serving the terminal is the AS 1.

Optionally, the AS controller may determine, based on at least one ofthe location information of the target UPF entity or the locationinformation of the terminal included in the first message, that the ASserving the terminal is the AS 1.

S912. The AS controller sends indication information of the AS 1 to theSMF entity, such that the SMF entity receives the indication informationof the AS 1 from the AS controller.

Optionally, the indication information of the AS 1 may be locationinformation of the AS 1, identifier information of the AS 1, informationindicating that the AS 1 does not change, or the like. This is notspecifically limited in this embodiment of this application.

After receiving the indication information of the AS 1 from the AScontroller, the SMF entity may determine, based on the indicationinformation of the AS 1, that a handover of the AS does not occur. Forexample, if the indication information of the AS 1 is the locationinformation of the AS 1, the location information of the AS 1 may becompared with location information of a current AS; and if the locationinformation of the AS 1 is the same as the location information of thecurrent AS, it is determined that the handover of the AS does not occur.

S913. The SMF entity sends an N4 session modification request to thetarget UPF entity, such that the target UPF entity receives the N4session modification request from the SMF entity.

The N4 session modification request includes a first routing rule. Thefirst routing rule includes that data whose destination address is anaddress of the AS 1 is sent to the AS 1.

S914. The target UPF entity sends an N4 session modification response tothe SMF entity, such that the SMF entity receives the N4 sessionmodification response from the target UPF entity, where the N4 sessionmodification response is used to indicate that establishment of abottom-layer network pipeline between the terminal and the AS 2 iscompleted.

Currently, there are two sessions: the first PDU session and the secondPDU session. Therefore, currently, corresponding service transmissionpaths are:

the terminal <-> the target base station <-> the source UPF entity <->the AS 1, and

the terminal <-> the target base station <-> the target UPF entity <->the AS 2.

S915. The SMF entity sends a sixth message to the terminal, such thatthe terminal receives the sixth message from the SMF entity, where thesixth message is used to instruct the terminal to release the first PDUsession.

S916. The terminal releases the first PDU session based on the sixthmessage.

For a procedure of releasing the first PDU session by the terminal,refer to other approaches. Details are not described herein.

According to the service continuity implementation method provided inthis embodiment of this application, in one aspect, after the SMF entityselects the target UPF entity to serve the terminal, the SMF entity mayreceive the indication information of the AS 1, and send the firstrouting rule to the target UPF entity based on the indicationinformation of the AS 1, such that the target UPF entity can transmitservice data according to the first routing rule. In addition, beforethe AS controller determines whether the handover of the AS occurs, theSMF entity may continue to maintain a service connection between theterminal and the AS 1. Therefore, seamless service data handover can beimplemented in a scenario in which a handover of the UPF entity occurs,to ensure service continuity in a handover process. In another aspect,the first routing rule is that the data whose destination address is theAS 1 is sent to the AS 1. This can prevent the target UPF entity fromrouting the data that is to be sent to the address of the AS 1 first toa remote DN and then to the AS 1. Therefore, a path from the terminal tothe AS 1 is shortest, and latency is controllable.

The actions of the SMF entity in steps S903, S904, S906, S908, S909,S910, S913, S915, and S916 may be performed by the processor 401 in thecommunications device 400 shown in FIG. 4 by invoking the applicationprogram code stored in the memory 403. This is not limited in thisembodiment of this application.

The actions of the AS controller in steps S911 and S912 may be performedby the processor 401 in the communications device 400 shown in FIG. 4 byinvoking the application program code stored in the memory 403. This isnot limited in this embodiment of this application.

The foregoing mainly describes, from a perspective of interactionsbetween network elements, the solutions provided in the embodiments ofthis application. It may be understood that, to implement the foregoingfunctions, the session management function entity and the control deviceinclude corresponding hardware structures and/or software modules forperforming the functions. A person of ordinary skill in the art shouldbe aware that, in combination with the examples described in theembodiments disclosed in this specification, units and algorithm stepsmay be implemented using hardware or a combination of hardware andcomputer software. Whether a function is performed using hardware orhardware driven by computer software depends on particular applicationsand design constraints of the technical solutions. A person skilled inthe art may use different methods to implement the functions for eachparticular application, but it should not be considered that theimplementation goes beyond the scope of this application.

In the embodiments of this application, the session management functionentity and the control device may be divided into function modules basedon the foregoing method examples. For example, each function module maybe obtained through division based on each corresponding function, ortwo or more functions may be integrated into one processing module. Theintegrated module may be implemented in a form of hardware, or may beimplemented in a form of a software function module. It should be notedthat, in the embodiments of this application, module division is anexample, and is merely logical function division. During actualimplementation, another division manner may be used.

For example, when each function module is obtained through divisionbased on each corresponding function, FIG. 10 is a possible schematicstructural diagram of the session management function entity 100 in theforegoing embodiments. The session management function entity 100includes a selection module 1001, a sending module 1002, and a receivingmodule 1003. The selection module 1001 is configured to select a targetuser plane function entity to serve a terminal. The sending module 1002is configured to send a first message to a control device. The receivingmodule 1003 is configured to receive indication information of a firstAS from the control device. The sending module 1002 is furtherconfigured to send a first routing rule to the target user planefunction entity based on the indication information of the first AS. Thefirst routing rule includes that data whose destination address is anaddress of the first AS is sent to the first AS.

Optionally, the sending module 1002 is further configured to send asecond routing rule to the target user plane function entity after theselection module 1001 selects the target user plane function entity toserve the terminal and before the first routing rule is sent to thetarget user plane function entity. The second routing rule includes thatdata whose destination address is an address of a second AS is sent to asource user plane function entity, the second AS is an AS currentlyserving the terminal, and the source user plane function entity is auser plane function entity communicatively connected to the second AS.

Optionally, the sending module 1002 is further configured to send firstpath information to the target user plane function entity after theselection module 1001 selects the target user plane function entity toserve the terminal; and the sending module 1002 is further configured tosend second path information to the source user plane function entityafter the selection module 1001 selects the target user plane functionentity to serve the terminal. The first path information and the secondpath information are used to establish a forwarding path between thetarget user plane function entity and the source user plane functionentity.

Optionally, the sending module 1002 is further configured to send athird routing rule to the target user plane function entity after theselection module 1001 selects the target user plane function entity toserve the terminal. The third routing rule includes that data whosedestination address is an address of a first data network is sent to aremote user plane function entity, and the remote user plane functionentity is a user plane function entity communicatively connected to thefirst data network.

Optionally, the sending module 1002 is further configured to send thirdpath information to the target user plane function entity after theselection module 1001 selects the target user plane function entity toserve the terminal; and the sending module 1002 is further configured tosend fourth path information to the remote user plane function entityafter the selection module 1001 selects the target user plane functionentity to serve the terminal. The third path information and the fourthpath information are used to establish a forwarding path between thetarget user plane function entity and the remote user plane functionentity.

Optionally, the sending module 1002 is further configured to send asecond message to the target user plane function entity after sendingthe first routing rule to the target user plane function entity. Thesecond message is used to request to delete the second routing rule.

Optionally, the sending module 1002 is further configured to send athird message to the target user plane function entity after sending thefirst routing rule to the target user plane function entity. The thirdmessage is used to request to delete the first path information.

Optionally, the sending module 1002 is further configured to send afourth message to the source user plane function entity after sendingthe first routing rule to the target user plane function entity. Thefourth message is used to request to delete user plane information,corresponding to the terminal, on the source user plane function entity,and the user plane information includes the second path information.

Optionally, the sending module 1002 is further configured to send fifthpath information to a target base station before the selection module1001 selects the target user plane function entity to serve theterminal; and the sending module 1002 is further configured to sendsixth path information to the source user plane function entity beforethe selection module 1001 selects the target user plane function entityto serve the terminal. The fifth path information and the sixth pathinformation are used to establish a forwarding path between the targetbase station and the source user plane function entity, the source userplane function entity is a user plane function entity currentlyestablishing a first PDU session with the terminal, and the target basestation is a base station currently communicatively connected to thetarget user plane function entity.

Optionally, the selection module 1001 is configured to: send a fifthmessage to the terminal, where the fifth message is used to request toestablish a second PDU session; and select, in a process of establishingthe second PDU session, the target user plane function entity to servethe terminal.

Optionally, the sending module 1002 is configured to send a sixthmessage to the terminal after sending the first routing rule to thetarget user plane function entity. The sixth message is used to requestto release the first PDU session.

Optionally, the sending module 1002 is further configured to send aseventh message to the control device after sending the first routingrule to the target user plane function entity. The seventh message isused to request to switch the terminal from the second AS to the firstAS, and the second AS is the AS currently serving the terminal.

Optionally, the receiving module 1003 is further configured to receivean eighth message from the control device after the sending module 1002sends the seventh message to the control device. The eighth message isused to indicate that the terminal has been switched from the second ASto the first AS.

All related content of steps in the foregoing method embodiments may becited in function descriptions of corresponding function modules, anddetails are not described herein again.

When each function module is obtained through division in an integratedmanner, FIG. 11 is a possible schematic structural diagram of thesession management function entity 110 in the foregoing embodiments. Thesession management function entity 110 includes a processing module 1101and a communications module 1102. The processing module 1101 may beconfigured to perform an operation that can be performed by theselection module 1001 in FIG. 10. The communications module 1102 may beconfigured to perform operations that can be performed by the receivingmodule 1003 and the sending module 1002 in FIG. 10. For details, referto the embodiment shown in FIG. 10. Details are not described again inthis embodiment of this application.

All related content of steps in the foregoing method embodiments may becited in function descriptions of corresponding function modules, anddetails are not described herein again.

In this embodiment, the session management function entity is presentedin a form in which each function module is obtained through divisionbased on each corresponding function, or the session management functionentity is presented in a form in which each function module is obtainedthrough division in an integrated manner. The “module” herein may be anapplication-specific integrated circuit (ASIC), a circuit, a processorand a memory that execute one or more software programs or firmwareprograms, an integrated logic circuit, and/or another component that canprovide the foregoing function. In an embodiment, a person skilled inthe art may appreciate that the session management function entity 100or the session management function entity 110 may be in a form shown inFIG. 4. For example, the selection module 1001, the sending module 1002,and the receiving module 1003 in FIG. 10 may be implemented using theprocessor 401 and the memory 403 in FIG. 4. The selection module 1001,the sending module 1002, and the receiving module 1003 may beimplemented using the processor 401 by invoking the application programcode stored in the memory 403. This is not limited in this embodiment ofthis application. Alternatively, for example, the processing module 1101and the communications module 1102 in FIG. 11 may be implemented usingthe processor 401 and the memory 403 in FIG. 4. The processing module1101 and the communications module 1102 may be implemented using theprocessor 401 by invoking the application program code stored in thememory 403. This is not limited in this embodiment of this application.

The session management function entity provided in this embodiment ofthis application may be configured to perform the service continuityimplementation method. Therefore, for a technical effect that can beobtained by the session management function entity, refer to theforegoing method embodiments. Details are not described herein again.

For example, when each function module is obtained through divisionbased on each corresponding function, FIG. 12 is a possible schematicstructural diagram of the control device in the foregoing embodiments.The control device 120 includes a receiving module 1201 and a sendingmodule 1202. The receiving module 1201 is configured to receive a firstmessage from a session management function entity. The sending module1202 is configured to send indication information of a first AS to thesession management function entity. The indication information of thefirst AS is used to instruct the session management function entity tosend a first routing rule to a target user plane function entity, andthe first routing rule includes that data whose destination address isan address of the first AS is sent to the first AS.

Optionally, as shown in FIG. 12, the control device 120 further includesa switching module 1203. The receiving module 1201 is further configuredto receive a seventh message from the session management function entityafter the sending module 1202 sends the indication information of thefirst AS to the session management function entity. The seventh messageis used to instruct to switch a terminal from a second AS to the firstAS, and the second AS is an AS currently serving the terminal. Theswitching module 1203 is configured to switch the terminal from thesecond AS to the first AS based on the seventh message.

All related content of steps in the foregoing method embodiments may becited in function descriptions of corresponding function modules, anddetails are not described herein again.

When each function module is obtained through division in an integratedmanner, FIG. 13 is a possible schematic structural diagram of thecontrol device 130 in the foregoing embodiments. The control device 130includes a communications module 1301. The communications module 1301may be configured to perform operations that can be performed by thereceiving module 1201 and the sending module 1202 in FIG. 12. Fordetails, refer to the embodiment shown in FIG. 12. Details are notdescribed again in this embodiment of this application.

Optionally, as shown in FIG. 13, the control device 130 provided in thisembodiment of this application may further include a processing module1302. The processing module 1302 may be configured to perform anoperation that can be performed by the switching module 1203 in FIG. 12.For details, refer to the embodiment shown in FIG. 12. Details are notdescribed again in this embodiment of this application.

All related content of steps in the foregoing method embodiments may becited in function descriptions of corresponding function modules, anddetails are not described herein again.

In this embodiment, the control device is presented in a form in whicheach function module is obtained through division based on eachcorresponding function, or the control device is presented in a form inwhich each function module is obtained through division in an integratedmanner. The “module” herein may be an application-specific integratedcircuit (ASIC), a circuit, a processor and a memory that execute one ormore software programs or firmware programs, an integrated logiccircuit, and/or another component that can provide the foregoingfunction. In a simple embodiment, a person skilled in the art mayappreciate that the control device 120 or the control device 130 may bein a form shown in FIG. 4. For example, the receiving module 1201, thesending module 1202, and the switching module 1203 in FIG. 12 may beimplemented using the processor 401 and the memory 403 in FIG. 4. Thereceiving module 1201, the sending module 1202, and the switching module1203 may be implemented using the processor 401 by invoking theapplication program code stored in the memory 403. This is not limitedin this embodiment of this application. Alternatively, for example, theprocessing module 1302 and the communications module 1301 in FIG. 13 maybe implemented using the processor 401 and the memory 403 in FIG. 4. Theprocessing module 1302 and the communications module 1301 may beimplemented using the processor 401 by invoking the application programcode stored in the memory 403. This is not limited in this embodiment ofthis application.

The control device provided in this embodiment of this application maybe configured to perform the service continuity implementation method.Therefore, for a technical effect that can be obtained by the controldevice, refer to the foregoing method embodiments. Details are notdescribed herein again.

All or some of the foregoing embodiments may be implemented usingsoftware, hardware, firmware, or any combination thereof. When asoftware program is used to implement the embodiments, all or some ofthe embodiments may be implemented in a form of a computer programproduct. The computer program product includes one or more computerinstructions. When the computer program instructions are loaded andexecuted on a computer, all or some of the procedures or functionsaccording to the embodiments of this application are generated. Thecomputer may be a general-purpose computer, a dedicated computer, acomputer network, or other programmable apparatuses. The computerinstructions may be stored in a computer-readable storage medium or maybe transmitted from a computer-readable storage medium to anothercomputer-readable storage medium. For example, the computer instructionsmay be transmitted from a website, computer, server, or data center toanother website, computer, server, or data center in a wired (forexample, a coaxial cable, an optical fiber, or a digital subscriber line(DSL)) or wireless (for example, infrared, radio, or microwave) manner.The computer-readable storage medium may be any usable medium accessibleby the computer, or a data storage device, such as a server or a datacenter, integrating one or more usable media. The usable medium may be amagnetic medium (for example, a floppy disk, a hard disk, or a magnetictape), an optical medium (for example, a DVD), a semiconductor medium(for example, a solid-state drive (SSD)), or the like.

Although this application is described with reference to theembodiments, in a process of implementing this application that claimsprotection, a person skilled in the art may understand and implementanother variation of the disclosed embodiments by viewing theaccompanying drawings, disclosed content, and the accompanying claims.In the claims, “comprising” does not exclude another component oranother step, and “a” or “one” does not exclude a meaning of plurality.A single processor or another unit may implement several functionsenumerated in the claims. Some measures are recorded in dependent claimsthat are different from each other, but this does not mean that thesemeasures cannot be combined to produce a better effect.

Although this application is described with reference to examplefeatures and the embodiments thereof, various modifications andcombinations may be made to the features and the embodiments withoutdeparting from the spirit and scope of this application.Correspondingly, the specification and accompanying drawings are merelyexample descriptions of this application defined by the accompanyingclaims, and are considered as any of or all modifications, variations,combinations or equivalents that cover the scope of this application. Aperson skilled in the art can make various modifications and variationsto this application without departing from the spirit and scope of thisapplication. This application is intended to cover these modificationsand variations of this application provided that these modifications andvariations fall within the scope of protection defined by the followingclaims and their equivalent technologies.

What is claimed is:
 1. A service continuity implementation method,comprising: selecting, by a session management function entity, a targetuser plane function entity to serve a terminal; sending, by the sessionmanagement function entity, first path information to the target userplane function entity; sending, by the session management functionentity, second path information to a source user plane function entity,wherein the first path information and the second path information arefor establishing a forwarding path between the target user planefunction entity and the source user plane function entity; sending, bythe session management function entity, a first message to a controldevice; receiving, by the session management function entity, indicationinformation of a first application server (AS) from the control device;and sending, by the session management function entity, a first routingrule to the target user plane function entity based on the indicationinformation of the first AS, wherein the first routing rule specifiesthat data whose destination address is an address of the first AS is tobe sent to the first AS.
 2. The service continuity implementation methodaccording to claim 1, after selecting the target user plane functionentity to serve the terminal, and before sending the first routing ruleto the target user plane function entity, the service continuityimplementation method further comprises sending, by the sessionmanagement function entity, a second routing rule to the target userplane function entity, wherein the second routing rule specifies thatdata whose destination address is an address of a second AS is to besent to a source user plane function entity, wherein the second AS is anAS currently serving the terminal, and wherein the source user planefunction entity is a user plane function entity communicativelyconnected to the second AS.
 3. The service continuity implementationmethod according to claim 2, after sending the first routing rule to thetarget user plane function entity, the service continuity implementationmethod further comprises sending, by the session management functionentity, a second message to the target user plane function entity,wherein the second message requests deletion of the second routing rule.4. The service continuity implementation method according to claim 1,further comprising: receiving, by the control device, the first messagefrom the session management function entity; and sending, by the controldevice, the indication information of the first AS to the sessionmanagement function entity.
 5. The service continuity implementationmethod according to claim 1, further comprising: receiving, by thecontrol device, a seventh message from the session management functionentity, wherein the seventh message instructs switching the terminalfrom a second AS to the first AS, and wherein the second AS is an AScurrently serving the terminal; and switching, by the control device,the terminal from the second AS to the first AS based on the seventhmessage.
 6. The service continuity implementation method according toclaim 1, wherein the first message comprises of location information ofthe target user plane function entity, and wherein of the locationinformation of the target user plane function entity is for determiningthat an AS serving the terminal is the first AS.
 7. The servicecontinuity implementation method according to claim 1, wherein theindication information of the first AS comprises location information ofthe first AS.
 8. A session management function entity, comprising: atleast one processor; and a memory storing computer-executableinstructions that, when executed by the at least one processor, instructthe at least one processor to: select a target user plane functionentity to serve a terminal; send first path information to the targetuser plane function entity; send second path information to a sourceuser plane function entity, wherein the first path information and thesecond path information are for establishing a forwarding path betweenthe target user plane function entity and the source user plane functionentity; send a first message to a control device; receive indicationinformation of a first application server (AS) from the control device;and send a first routing rule to the target user plane function entitybased on the indication information of the first AS, wherein the firstrouting rule specifies that data whose destination address is an addressof the first AS is to be sent to the first AS.
 9. The session managementfunction entity according to claim 8, wherein the computer-executableinstructions, when executed, further instruct the at least one processorto send a second routing rule to the target user plane function entityafter the at least one processor selects the target user plane functionentity to serve the terminal and before the first routing rule is sentto the target user plane function entity, wherein the second routingrule specifies that data whose destination address is an address of asecond AS is to be sent to a source user plane function entity, whereinthe second AS is an AS currently serving the terminal, and wherein thesource user plane function entity is a user plane function entitycommunicatively connected to the second AS.
 10. The session managementfunction entity according to claim 9, wherein the computer-executableinstructions, when executed, further instruct the at least one processorto send a second message to the target user plane function entity aftersending the first routing rule to the target user plane function entity,wherein the second message requests to delete the second routing rule.11. The session management function entity according to claim 8, whereinthe computer-executable instructions, when executed, further instructthe at least one processor to send a seventh message to the controldevice after sending the first routing rule to the target user planefunction entity, wherein the seventh message requests switching theterminal from a second AS to the first AS, and wherein the second AS isan AS currently serving the terminal.
 12. The session managementfunction entity according to claim 11, wherein the computer-executableinstructions, when executed, further instruct the at least one processorto receive an eighth message from the control device after sending theseventh message to the control device, wherein the eighth messageindicates that the terminal has been switched from the second AS to thefirst AS.
 13. A service continuity implementation system, comprising: asession management function entity configured to: select a target userplane function entity to serve a terminal; send first path informationto the target user plane function entity; send second path informationto a source user plane function entity, wherein the first pathinformation and the second path information are used to establish aforwarding path between the target user plane function entity and thesource user plane function entity; and send a first message to acontroller; and the controller, wherein the controller configured tosend indication information of a first application server (AS), whereinthe session management function entity is further configured to: receivethe indication information of the first AS; and send a first routingrule to the target user plane function entity based on the indicationinformation of the first AS, wherein the first routing rule specifiesthat data whose destination address is an address of the first AS is tobe sent to the first AS.
 14. The service continuity implementationsystem according to claim 13, wherein the session management functionentity is further configured to send a second routing rule to the targetuser plane function entity, wherein the second routing rule specifiesthat data whose destination address is an address of a second AS is tobe sent to a source user plane function entity, wherein the second AS isan AS currently serving the terminal, and wherein the source user planefunction entity is a user plane function entity communicativelyconnected to the second AS.
 15. The service continuity implementationsystem according to claim 14, wherein the session management functionentity is further configured to send a second message to the target userplane function entity, wherein the second message requests to delete thesecond routing rule.
 16. The service continuity implementation systemaccording to claim 13, wherein the session management function entity isfurther configured to send a seventh message to the controller, whereinthe seventh message requests the controller to switch the terminal froma second AS to the first AS, wherein the second AS is an AS currentlyserving the terminal, and wherein the controller is further configuredto: receive the seventh message from the session management functionentity; and switch the terminal from the second AS to the first AS. 17.The service continuity implementation system according to claim 16,wherein the controller is further configured to send an eighth messageto the session management function entity, wherein the eighth messageindicates to the session management function entity that the terminalhas been switched from the second AS to the first AS, and wherein thesession management function entity is further configured to receive theeighth message from the controller.
 18. The session management functionentity according to claim 8, wherein the first message compriseslocation information of the target user plane function entity, andwherein the location information of the target user plane functionentity is for determining that an AS serving the terminal is the firstAS.
 19. The service continuity implementation system according to claim13, wherein the first message comprises location information of thetarget user plane function entity, and wherein the location informationof the target user plane function entity is for determining that an ASserving the terminal is the first AS.